syhzaidi's Q&A profile
Visual C# how do you apply a class
hello all, I am new with C# and stuck on some coursework I have created a class: public class student { //start of class declaration public string name="Jane Doe"; public string course="Multimedia and Internet Systems"; public string email="test@test.com"; } how do I apply the class to a textbox so that when the user selects one of the details say name then the name will appear in the textbox. or am i doing something completely wrong with the class i am using MS Visual Studio .NET 2003 any help would be greatly appreciated edit: i am using a main menu in the application, so when the user selects name from the menu it will display in the textbox bklare wrote: Everything with th ...Show All
SQL Server storedproc return
for some reason i keep getting a exception heres the code for the app int returnvalue = 0; DateTime dateCreated = DateTime.Now; // All users are added to Guests role upon registration. Roles.AddUserToRole(username, "Users"); String connectionString = ConfigurationManager.ConnectionStrings["SqlConn"].ConnectionString; SqlConnection conn = new SqlConnection(connectionString); SqlCommand command = null; try { conn.Open(); command = new SqlCommand("InsertMember", conn); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new SqlParameter("@AspNetUsername", username)); command.Parameters.Add(new S ...Show All
Visual Studio Calendar and multivalue parameter controls does not work in Report Viewer Web Server Control
Hello i have a report viewer in my web page, it use a remote report. When i try to display the list box with multivalue parameter or i try to use the date chooser, to set the values of the parameters i get a Java script error. Hello, Set the Style attributte for report viewer as Style=position tatic. For ex: <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Style="position tatic" Font-Names="Verdana" Font-Size="8pt" Height="400px" ProcessingMode="Remote"> <ServerReport ReportPath="/ReportServerProjectTest/Test" /> </rsweb:ReportViewer> Thanks, Vani Kulkarni ...Show All
Smart Device Development ActivateService sometimes fail
Hi, I've developed a service component that runs under Services.exe. I also have a user interface to control the service. To start the Service I write the necessary information to the key HKLM\Services\MyService and call ActivateService (ActivateService(TEXT("MyService"), 0)). This works fine for most of the time but occationally it fails with the result code 87(ERROR_INVALID_PARAMETER). I flushed the registry just before the call to ActivateService but that made no difference. I set the Flags registry value to DEVFLAGS_LOADLIBRARY but still no success. What's going on here I fails approximately one time of twenty. DeregisterService on the other hand never fails. I can't find any information about this, but surely I can't be t ...Show All
Commerce Server Site Unpacking Error Creating URL?
Hi, I am having a problem when unpacking a site. When it's packed, it packs each of the 4 webservices and the site itself.. When unpacking, it successfully does everything except at the very end it says: An error occurred when attempting to create the URL for the following IIS application: ResearchStore 46:Permission denied This is the application itself.. so if I go into Commerce Server Manager, under applications, I see the 4 web services and NO application, whereas on my dev machine where I packaged it there are 5, including the application itself. I am unpacking the site as a local admin on the target machine..and in IIS I see that the site WAS created as a VD under the Default Web Site, so does anyone know what permissions I ...Show All
Visual C# what is Impersonation
can someone expain me what is Impersonation from an ASP.NET side and when it can be used. If you have any simple examples, please share. Thank you, HI, I am sorry I don’t understand exactly what I still have to do. I deleted the code above, since you said I don’t need it, Looking at your links: I have added this code behind: Windows Authentication Provider @ http://msdn2.microsoft.com/en-us/library/eeyk640h.aspx since I am trying to implement the code in asp.net Code behind: it says: IntPtr accountToken = WindowsIdentity.GetCurrent().Token; WindowsIdentity windowsIdentity = new WindowsIdentity(accountToken); Response.Write("<BR>Created a Win ...Show All
Visual C++ Switching from BETA to RELEASE VS 2005 gets me an error!
c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(1814) : error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h(553) : see declaration of 'CObject::CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h(524) : see declaration of 'CObject' This diagnostic occurred in the compiler generated function 'CCmdTarget::CCmdTarget(const CCmdTarget &)' I think instead of changing parameter type CEdit to CEdit * , and then any call of function from edit1 to &edit1 , it is also possible just to change the parameter type to CEdit & (or const CEd ...Show All
Software Development for Windows Vista Convert Data_Str
Hi I have modified the stored procedure insertTrackingDataItem (SqlTracking Database), so that only the last Tracking DataItem is stored in a seperate Table with the same Structure as TrackingDataItem Table. This all works fine, the problem I have is how do I convert the the data blob stored in the Data_Str field back to my ExternalEventArgs Hi thanks for the reply I cant see how your code maps to my new table What I'm trying to acheive is a faster way to get the last state of all my workflows at the moment its taking 10 seconds. So I trying to use sql to retreive the latest state for each workflow from a table which has the same structure as TrackingDataItem table. I have modified the st ...Show All
Visual C# Import Excel Spreadsheet Data into SQL Server Database Table
Hi All, I am trying to import data from an Excel spreadsheet into a SQL server db table though having some issues. This is the code I'm using: private void Button1_Click( object sender, System.EventArgs e) { // Connection String to Excel Workbook string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;"""; // Create Connection to Excel Workbook using (OleDbConnection connection = new OleDbConnection(excelConnectionString)) { //OleDbCommand command = new OleDbCommand ("Select ID,Data FROM [Data$]", connection); connection.Open(); OleDbCommand command = new OleDbCommand ("Select ID,Data FROM [Data$]& ...Show All
Windows Forms How can we add advance search/filter capabilities to a DataGridView???
Hi! I would like to use an Advanced search dialog in order to provide the final user with advance searching capabilities in my DataGridView...For example to select only those customers names (from the Customer column) that live in a certain city (from the city column)... The BindingSource.Filter method doesn't support this capability...Any help Thanks in advance... perhaps no data found in that criteria! :) I've just tested it again and works very well. I have a table with records I do a query on the dataset/datatable: DataRow[] theResults = theDataSet.Tables[0].Select("[ID] = 2"); this.theDataGridView.DataSource = theResults; and I get only the record ID 2 entries. ...Show All
Visual Basic Setting HSB value. Yes add a ColorDialog to your code then>>
Is there a way to set the HSB values of a pixel in an image Hi, The first Sub here calls up ColorDialog1 and sets the Tag value of the textbox named txtColor . The button name is btnColorDialog Private Sub btnColorDialog_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnColorDialog.Click Me .ColorDialog1.ShowDialog() txtColor.Text = Me .ColorDialog1.Color.ToString txtColor.Tag = Me .ColorDialog1.Color.ToArgb End Sub Then elsewhere in my graphics demo code i have this Sub to CLS or CLearScreen on my picture box which is named picBoxOutput >> Private Sub CLS() v_color = CInt (btnBackColour.Tag) picBoxOutput.CreateGraphics.Clear(Color.FromArg ...Show All
SQL Server Recursing XML using XQuery...
Hi, Being new to this forum, and SQL Server 2005 XQuery in general, I was wondering whether someone could provide assistance with the following query, I'm sure its mind-numbingly simple :) I need to scan an XML column for specific repeating structures that may or may not be there that contain nodes that also may or may not be there, and output them in a standard flat record format. I've had a quick scan of this forum and have noticed this post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1039466&SiteID=1 Text extracted below: ============================= declare @x1 xml set @x1= '< xml version="1.0" encoding="UTF-8" > <Groups> <StationGroups> <SGroup> <GroupNam ...Show All
SQL Server Decimal Formatting from OLEDB Source to Flat File
I have a table with column (call it Rate) defined as decimal(18,4). This column can have any positive decimal value. When the value is less than 1 (e.g. 0.1234) strange things are happening in SSIS. To set the scenario ... If I do a select in Management Studio, the value is correctly displayed as 0.1234 If I do the same select from the command line via OSQL, I get .1234 If I do SELECT CONVERT(char(6), Rate) from OSQL, I get 0.1234 (which is what I want) In SSIS I have an OLE DB Source which defines the SELECT statement to use, and that maps straight to a Flat File Destination. The default column type in the flat file connection manager is DT_NUMERIC, Precision 18, Scale 4. I Set InputColumnWidth to 6 as that's how I need it in the f ...Show All
SQL Server Installed SQLServer 2005 TrialEdition
Hi Fellows, I am really in a fix.I have downloaded the trial version from MIcrosoft site and run setup with named instance. But I cannot find my management console link anywhere. Can anyone help me here . My site is : Windows XP Professional SP2 Installed : SQLServer 2005 180Day Trial Pack downloaded from Microsoft Network. I ran setup from : server directory and also from tools directory. In my programes menu I can only see Configuration Toolsunder which there are three options : 1) SQL Server Configuration Tool 2) SQL Server Surface Configuration Tool and 3) SQL Server Error and Usage Reporting Thanks... I went add/remove [the wrong sql server component first] and th ...Show All
SQL Server calling stored procedure in project
hey all I am very new to stored procedures and would like some clarification please I have a stored procedure written by someone else I generally use SQL Server Business Intelligence Studio. I am designing a report and have called this sp exec GetTicketsSnapshot (being the name of sp) 1 window only is populated if I run this in sql Server Management Studio it populates 3 windows which is what I would expect to see can someone explain thanks Jewel, Do you mean that you have 3 different resultset in the same stored procedure I'm just trying to get a clearer picture of what your issue is. Ham ...Show All
