Click here to Skip to main content
15,913,939 members
Home / Discussions / C#
   

C#

 
GeneralRe: dynamically adding tabpages to a tabcontrol Pin
Heath Stewart9-Aug-04 17:57
protectorHeath Stewart9-Aug-04 17:57 
GeneralRe: dynamically adding tabpages to a tabcontrol Pin
samithas9-Aug-04 18:47
samithas9-Aug-04 18:47 
GeneralRe: dynamically adding tabpages to a tabcontrol Pin
sreejith ss nair9-Aug-04 20:06
sreejith ss nair9-Aug-04 20:06 
GeneralDrag and Drop to Desktop Pin
c-minor9-Aug-04 17:32
c-minor9-Aug-04 17:32 
GeneralRe: Drag and Drop to Desktop Pin
Heath Stewart9-Aug-04 17:54
protectorHeath Stewart9-Aug-04 17:54 
Generalado .net sql insert - should be simple but don't get it Pin
JeromeKJerome9-Aug-04 14:07
JeromeKJerome9-Aug-04 14:07 
GeneralRe: ado .net sql insert - should be simple but don't get it Pin
Heath Stewart9-Aug-04 18:01
protectorHeath Stewart9-Aug-04 18:01 
GeneralRe: ado .net sql insert - should be simple but don't get it Pin
JeromeKJerome10-Aug-04 6:23
JeromeKJerome10-Aug-04 6:23 
This app is very simple, data adapter ought to work for it. I've added the following code after the input stream is unpacked and assigned to string variables but it still doesn't update. My test db has one row and it shows up if I preview the data and fill the dataset, so I know the adapter is configured for the sql server ok. The code compiles and runs ok, but update returns 0 as a result and no changes are observed in the database. The one row is unaffected and no new rows are inserted. The response shows the registration first name, so it's unpacked ok.


Registration1 registration = new Registration1();
DataRow workRow = registration.ProductRegistration.NewRow();

workRow["firstName"] = firstName;
workRow["lastName"] = lastName;
workRow["companyName"] = companyName;
workRow["address"] = address;
workRow["aptSuite"] = aptSuite;
workRow["city"] = city;
workRow["state"] = state;
workRow["zip"] = zip;
workRow["country"] = country;
workRow["phoneAreaCode"] = phoneAreaCode;
workRow["phone"] = phone;
workRow["email"] = email;

registration.ProductRegistration.Rows.Add(workRow);
registration.ProductRegistration.AcceptChanges();
registration.GetChanges();

if (!registration.HasErrors)
{
try
{
if (sqlDataAdapter1.Update(registration)>0) Response.Write("Registration Successful. ");
}
catch (System.Exception ex)
{
Response.Write(" Insert Failed. "+ex);
}
}
else
{
Response.Write(" Registration has errors ");
}
//Return a message to the user saying that registration is complete:
Response.Write(" Thank-you for registering, "
+firstName
+"!");

Response.End();

GeneralRe: ado .net sql insert - should be simple but don't get it Pin
Heath Stewart10-Aug-04 6:29
protectorHeath Stewart10-Aug-04 6:29 
GeneralRe: ado .net sql insert - should be simple but don't get it Pin
JeromeKJerome10-Aug-04 8:17
JeromeKJerome10-Aug-04 8:17 
GeneralRe: ado .net sql insert - should be simple but don't get it Pin
Heath Stewart10-Aug-04 9:44
protectorHeath Stewart10-Aug-04 9:44 
GeneralThin Client Pin
Anton Dorrestijn9-Aug-04 12:53
Anton Dorrestijn9-Aug-04 12:53 
GeneralRe: Thin Client Pin
Nick Parker9-Aug-04 13:52
protectorNick Parker9-Aug-04 13:52 
GeneralMixing .NET languages Pin
paulains9-Aug-04 12:47
paulains9-Aug-04 12:47 
GeneralRe: Mixing .NET languages Pin
Mark Greenwood9-Aug-04 13:27
Mark Greenwood9-Aug-04 13:27 
GeneralRe: Mixing .NET languages Pin
paulains9-Aug-04 17:51
paulains9-Aug-04 17:51 
GeneralRe: Mixing .NET languages Pin
Heath Stewart9-Aug-04 18:05
protectorHeath Stewart9-Aug-04 18:05 
GeneralRe: Mixing .NET languages Pin
Nick Parker9-Aug-04 13:45
protectorNick Parker9-Aug-04 13:45 
GeneralRe: Mixing .NET languages Pin
paulains9-Aug-04 17:56
paulains9-Aug-04 17:56 
GeneralArrays in c# Pin
cheesepirate9-Aug-04 9:04
cheesepirate9-Aug-04 9:04 
GeneralRe: Arrays in c# Pin
Reinout Hillmann9-Aug-04 9:51
sussReinout Hillmann9-Aug-04 9:51 
GeneralRe: Arrays in c# Pin
cheesepirate9-Aug-04 10:00
cheesepirate9-Aug-04 10:00 
GeneralRe: Arrays in c# Pin
Nick Parker9-Aug-04 10:21
protectorNick Parker9-Aug-04 10:21 
GeneralRe: Arrays in c# Pin
Bret Mulvey9-Aug-04 16:45
Bret Mulvey9-Aug-04 16:45 
GeneralRe: Arrays in c# Pin
leppie9-Aug-04 19:36
leppie9-Aug-04 19:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.