October 16, 2006 at 12:17 am
Hey guys, I am having some strange problem here. My code is as below:
cmd.connection = cnn
cmd.commandtext = "select count(*) from member"
dim i as integer
i = CInt(cmd.executeScalar)
However, it return the result "&H0" to me! When i check my query in sqlquery, it did show me the result as "11".
I have no idea on what is goin on, any help is appreaciated.ty.
October 16, 2006 at 6:52 am
soli guys, my code is correct. I have make a mistake... =P
cmd.connection = cnn
cmd.commandtext = "select count(*) from member"
label.text = CInt(cmd.ExecuteScalar)
Anywhere, thanks u guys all =)
October 16, 2006 at 7:43 am
Are you ignoring trapped errors?
e.g. no permission to table
If command fails, ExecuteScalar will return nothing and CInt will convert it to zero.
Far away is close at hand in the images of elsewhere.
Anon.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy