G
Guest
After I execute my datareader, say for e.g. Reader = dbCommand.ExecuteReader,
I can do a while loop to retrieve the results, like this:
While Reader.Read()
Result = Reader.GetString(0)
End While
Say if the result returned is an Integer, what should I do? Reader.GetInt16?
32? 64? Which to choose? And should I declare my Result as Int16, Int32,
Int64 or Integer, i.e. Dim Result As Integer?
And say if the reader will contain only 1 row of result, and I don't want to
use a while loop to retrieve that only result, what can I do?
And also if I like to convert a String to a Integer type in ASP.NET codes
using Visual Basic (something like parseInt), what's the method?
Can someone help me? Thank you very much...
I can do a while loop to retrieve the results, like this:
While Reader.Read()
Result = Reader.GetString(0)
End While
Say if the result returned is an Integer, what should I do? Reader.GetInt16?
32? 64? Which to choose? And should I declare my Result as Int16, Int32,
Int64 or Integer, i.e. Dim Result As Integer?
And say if the reader will contain only 1 row of result, and I don't want to
use a while loop to retrieve that only result, what can I do?
And also if I like to convert a String to a Integer type in ASP.NET codes
using Visual Basic (something like parseInt), what's the method?
Can someone help me? Thank you very much...