[thelist] ASP Question - Converting varchar to data type int

L L barn104_1999 at yahoo.com
Thu Dec 6 10:06:42 CST 2007

I'm working in ASP and have a data input page which has a 'unique id generator' that is in this format xxxx-xx-xxx-xxx, with the x's being all numeric.  The database column is set up to be 'varchar' to allow for the dashes.
However, I'm getting a problem in my data display page that says:
"syntax error converting the varchar value 'xxxx-xx-xxx-xxx' to a column of data type int."

for this code:
<%strSQL = "SELECT * FROM AMS where MinutesID = " & Request ("id")%>

Is there a way to convert the request string to varchar/non-numeric so that the two can be compared, etc?

Many thanks for your help and input,

Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

More information about the thelist mailing list