My only guess at this point is in the first test you are calling GetString first, and in the second test you are calling GetInt32 first. It's possible the the reader is casting your value to what you asked for first?
Is there a performance reason too, or just style?
Cause if there is one, I might need to change some lines of code. I've always happily used ToString() on
datareader where the element is a text/string.
Your code changed. When you test things you should change 1 item at a time, however, you have also changed order and type. In your last example, you are calling GetString and GetInt32 on nColNumber which refers to an integer, your code should read:
int nameColumn = odbcDataReader.GetOrdinal(@"name");
int idColumn = odbcDataReader.GetOrdinal(@"iq");
int iqValue= odbcDataReader.GetInt32(idColumn);
string nameValue = odbcDataReader.GetString(nameColumn );
I just typed it in the post window but you can see how different variable names make it easier to see.
We are using VSS for our windows c# projects...
What is the best and easiest way to monitor the changeRequests with the deployment versions?
Currently, each developer is working on a changerequest i.e. add a print button to FormA, etc...
Should there be a link between the version of the vss and the changerequest?, etc?
Last Visit: 31-Dec-99 19:00 Last Update: 10-Dec-23 21:12