|
-
Jul 21st, 2004, 11:31 AM
#1
Thread Starter
Hyperactive Member
ctype(objecttype, integer) doesn't work
dim o as object
o = SqlHelper.ExecuteScalar(sConnectionString, "CountProductsByCategory", 2)
rchTextbox.Text = CType(0, Integer)
By executing the stored proc, I am successfully getting the desired value into the object variable "o" (say 12). but when I use ctype function to convert that into integer, it shows up as 0 (zero) in the rich text box.
how can I do this convertion?
thanks
nath
-
Jul 21st, 2004, 11:40 AM
#2
rchTextbox.Text = CType(0, Integer)
^^ I hope that this is an example, as that 0 is the number not the character.
Also your textbox needs the string version, this below would do it, although there are other ways which Im sure other people will point out .
rchTextbox.Text = CStr(o, Integer)
-
Jul 21st, 2004, 11:55 AM
#3
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|