Strange error

kcwallace

Centurion
Joined
May 27, 2004
Messages
175
Location
Austin, TX
Can someone tell me why I am getting this error

{"Specified cast is not valid."}

The code:

C#:
 SqlDataReader dr = setDataReader(CntSQL, connection);
 long retVal=dr.GetInt64(0);

The returned value from the database is 2776842
 
Yeah, I figured that out after I posted my reply because when I posted my reply I saw your fixed post. So I deleted my reply. So yeah...
 
Back
Top