Convert

I need to convert a variable from a varchar to an int. I am requesting a username from a website. this username is actually a number. It needs
    to be checked against the SQL table which stores the username as an Int. What would the syntax be. This is what I tried, but failed.

    User = Convert("Individual","Username",SQL_Int)

    Todd Yolish
yolishAsked:
Who is Participating?
 
MasseyMConnect With a Mentor Commented:
Use:

User = CInt(Username)

where Username is the number in Char format and User will be ne number in Integer format.  This example is in VBScript.
0
All Courses

From novice to tech pro — start learning today.