I know this is probably a
stupid question.
da is a dataadapter of
course. My questin is if field cs-xref-nbr is an integer field in the database
and nCustomerNumber is an integer then why do I have to cast it in order to
assign the field data to the variable.
This works:
da.Fill(ds, "mytable");
DataRow r = ds.Tables["mytable"].Rows[0];
this.nCustomerNumber
= (int)r["cs-xref-nbr"];
This does not:
da.Fill(ds, "mytable");
DataRow r = ds.Tables["mytable"].Rows[0];
this.nCustomerNumber
= r["cs-xref-nbr"];
Thanks,
Jeremy Schreckhise, M.B.A.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group. To post to this group, send email to C_Sharp googlegroups.com To unsubscribe from this group, send email to C_Sharp-unsubscribe googlegroups.com For more options, visit this group at http://groups.google.com/group/C_Sharp -~----------~----~----~----~------~----~------~--~---
|