bail3yz
asked on
How to get bigint from database in C#?
This code in C# doesnt work.. it crashes ... playerid does have a value in the database.. and it is a bigint
long playerid;
playerid = (long)pRS.Fields["playerid "].Value;
This code in C++ does work.
long playerid;
playerid=pRS->Fields->GetI tem("playe rid")->Get Value();
Can anyone tell me why the C# code isnt working?
I am able to get all the other info in C# (strings).
The error I get is
"Specified cast is not valid"
long playerid;
playerid = (long)pRS.Fields["playerid
This code in C++ does work.
long playerid;
playerid=pRS->Fields->GetI
Can anyone tell me why the C# code isnt working?
I am able to get all the other info in C# (strings).
The error I get is
"Specified cast is not valid"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you !