Click here to Skip to main content
15,884,836 members
Home / Discussions / C#
   

C#

 
GeneralRe: Wow this is awesome Pin
Kentamanos26-Dec-03 13:38
Kentamanos26-Dec-03 13:38 
GeneralUnit Testing: Mock Objects Tutorial Pin
drazz7526-Dec-03 6:34
drazz7526-Dec-03 6:34 
GeneralRe: Unit Testing: Mock Objects Tutorial Pin
LongRange.Shooter30-Dec-03 9:54
LongRange.Shooter30-Dec-03 9:54 
GeneralVariable error Pin
Melanius26-Dec-03 4:27
Melanius26-Dec-03 4:27 
GeneralRe: Variable error Pin
Corinna John26-Dec-03 4:55
Corinna John26-Dec-03 4:55 
GeneralRe: Variable error Pin
Melanius26-Dec-03 4:59
Melanius26-Dec-03 4:59 
QuestionHow do I read the Identity Column using ADO.NET Pin
derik_konark26-Dec-03 4:24
derik_konark26-Dec-03 4:24 
AnswerRe: How do I read the Identity Column using ADO.NET Pin
LongRange.Shooter30-Dec-03 10:01
LongRange.Shooter30-Dec-03 10:01 
The error is definitely pointing at your oDR.GetInt32(0).ToString() portion of your code. You don't show what the SQL select statement looks like. But it sounds like the data you are getting is either not Int32 (and thus cannot convert it) or IS CORRUPT.

The first thing to do is find out just what the problem is with the data. Put a breakpoint at the while statement, step into the read, then do a QuickWatch on the oDR object to see what your second parameter data actually is. It could be something as simple as the fact that the data IS numeric, but your database is returning leading SPACES instead of leading ZERO.

If the data looks like crap, then the next thing to do is take the SQL that you are using in your program and run it inside Query Analyzer if is SQL or the equivalent if it is Oracle. See what you get back with the raw SQL and make sure your SELECT statement is truly executing the way you think it is.

All Debug 101 tasks.

_____________________________________________
The world is a dangerous place.
Not because of those that do evil,
    but because of those who look on and do nothing.

GeneralProvideProperty Attribute Problem Pin
Takeru Koushirou26-Dec-03 2:22
Takeru Koushirou26-Dec-03 2:22 
GeneralRe: ProvideProperty Attribute Problem Pin
Alex Korchemniy26-Dec-03 7:29
Alex Korchemniy26-Dec-03 7:29 
GeneralRe: ProvideProperty Attribute Problem Pin
Takeru Koushirou26-Dec-03 8:07
Takeru Koushirou26-Dec-03 8:07 
GeneralAdd Column to Access database using OleDB Pin
Wouter Van Ranst26-Dec-03 1:32
Wouter Van Ranst26-Dec-03 1:32 
GeneralRe: Add Column to Access database using OleDB Pin
Heath Stewart27-Dec-03 5:09
protectorHeath Stewart27-Dec-03 5:09 
GeneralRe: Add Column to Access database using OleDB Pin
Wouter Van Ranst27-Dec-03 6:56
Wouter Van Ranst27-Dec-03 6:56 
GeneralRe: Add Column to Access database using OleDB Pin
Heath Stewart27-Dec-03 7:01
protectorHeath Stewart27-Dec-03 7:01 
GeneralRe: Add Column to Access database using OleDB Pin
Wouter Van Ranst27-Dec-03 7:23
Wouter Van Ranst27-Dec-03 7:23 
QuestionSocket Program>????? Pin
h_wing25-Dec-03 22:45
h_wing25-Dec-03 22:45 
AnswerRe: Socket Program>????? Pin
Heath Stewart27-Dec-03 5:07
protectorHeath Stewart27-Dec-03 5:07 
Generalsimple generic add,mod,delete Pin
gotohellthen25-Dec-03 21:59
gotohellthen25-Dec-03 21:59 
GeneralRe: simple generic add,mod,delete Pin
Heath Stewart27-Dec-03 5:02
protectorHeath Stewart27-Dec-03 5:02 
Generaldetect connection Pin
heba_zien25-Dec-03 12:05
heba_zien25-Dec-03 12:05 
GeneralPrinting Page Number Pin
Mazdak25-Dec-03 9:07
Mazdak25-Dec-03 9:07 
GeneralRe: Printing Page Number Pin
Heath Stewart27-Dec-03 5:00
protectorHeath Stewart27-Dec-03 5:00 
GeneralRe: Printing Page Number Pin
Mazdak27-Dec-03 8:50
Mazdak27-Dec-03 8:50 
GeneralRe: Printing Page Number Pin
Heath Stewart27-Dec-03 11:20
protectorHeath Stewart27-Dec-03 11:20 

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.