the ExecuteScalar method returns an object (in VB.NET in VB6 I can't remember perhaps a variant) not a reader. The object is the value in the first column of the first row of the odbc result set.
Also your code doesn't look like valid VB.NET to me. Don't you have to declare the return type of the function? it's looking like VB6 or VBA syntax to me, especially with the brackets missing from the end of ExecuteScalar. Are you in the right forum?
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68