Click here to Skip to main content
15,915,093 members
Home / Discussions / Database
   

Database

 
GeneralRe: Comparison of '.NET SqlClient' and 'Microsoft OLEDB' for accessing MSSQL 7 and above Pin
Vasudevan Deepak Kumar25-May-03 19:44
Vasudevan Deepak Kumar25-May-03 19:44 
GeneralRe: Comparison of '.NET SqlClient' and 'Microsoft OLEDB' for accessing MSSQL 7 and above Pin
Uday Takbhate25-May-03 22:16
Uday Takbhate25-May-03 22:16 
GeneralBCP.exe and @@TEXTSIZE Pin
John Fisher23-May-03 11:47
John Fisher23-May-03 11:47 
QuestionDataSet and XML Schema? Pin
liuage21-May-03 23:28
liuage21-May-03 23:28 
GeneralIndex of item in subquery Pin
Addabis21-May-03 3:05
Addabis21-May-03 3:05 
GeneralRe: Index of item in subquery Pin
Arjan Einbu21-May-03 11:00
Arjan Einbu21-May-03 11:00 
GeneralRe: Index of item in subquery Pin
Addabis21-May-03 19:45
Addabis21-May-03 19:45 
GeneralDataRow cast problem Pin
Andy H21-May-03 1:00
Andy H21-May-03 1:00 
I have read a table from my db and want to create a list of the items in my table, for latter use etc.

I have the following code:

foreach( DataRow row in table.Rows )<br />
{<br />
   // fill out the client list<br />
   Client client = new Client();<br />
   client.SeqNo = 1;<br />
   client.ClientCode = row[ "ClientCode" ].ToString();<br />
   client.ClientID = row[ "ClientID" ];<br />
   m_arlClients.Add( client );<br />
}


but when it gets to client.ClientID = row[ "ClientID" ]; I get a cast exception "cannot convert string to long" or somthing along those lines. My underlying database stores the ClientID as a long and that is how I want to store it in my client object.

How can I read the ClientID from the row obkect as a long?
GeneralRe: DataRow cast problem Pin
Arjan Einbu21-May-03 2:37
Arjan Einbu21-May-03 2:37 
GeneralRe: DataRow cast problem Pin
Andy H21-May-03 3:12
Andy H21-May-03 3:12 
GeneralDataset Diff - Pin
jmwalke120-May-03 14:22
jmwalke120-May-03 14:22 
GeneralParamaterized Queries Pin
David Salter20-May-03 11:22
David Salter20-May-03 11:22 
GeneralADO help pls Pin
BlackRider20-May-03 5:16
BlackRider20-May-03 5:16 
GeneralAttn: sql gurus, help! Pin
Member 9619-May-03 12:38
Member 9619-May-03 12:38 
GeneralRe: Attn: sql gurus, help! Pin
andyharman19-May-03 13:58
professionalandyharman19-May-03 13:58 
GeneralRe: Attn: sql gurus, help! Pin
Member 9619-May-03 16:41
Member 9619-May-03 16:41 
GeneralRe: Attn: sql gurus, help! Pin
Member 9620-May-03 5:15
Member 9620-May-03 5:15 
GeneralRe: Attn: sql gurus, help! Pin
Anonymous25-May-03 14:26
Anonymous25-May-03 14:26 
GeneralMostly working stored procedure revised Pin
Mike Osbahr19-May-03 11:09
Mike Osbahr19-May-03 11:09 
GeneralClarification Pin
Mike Osbahr19-May-03 16:18
Mike Osbahr19-May-03 16:18 
GeneralDesign Question Pin
Mark Sanders18-May-03 9:33
Mark Sanders18-May-03 9:33 
GeneralRe: Design Question Pin
Jeremy Oldham19-May-03 3:42
Jeremy Oldham19-May-03 3:42 
Generalcollation , locale ID Pin
Hesham Amin16-May-03 5:36
Hesham Amin16-May-03 5:36 
GeneralGot it !! Pin
Hesham Amin16-May-03 21:23
Hesham Amin16-May-03 21:23 
GeneralInstalling MSDE question Pin
DxSolo16-May-03 5:02
DxSolo16-May-03 5:02 

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.