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

Jay Turley jayturley at gmail.com
Thu Dec 6 10:19:36 CST 2007

It looks to me like MinutesID is supposed to be an int in the dB. Do you
have more information about your table setup?

My guess is you need somethign more like:

<%strSQL = "SELECT * FROM AMS where Foo= " & Request ("id")%>

where Foo is the name of the column where the unique ids are stored as


On Dec 6, 2007 9:06 AM, L L <barn104_1999 at yahoo.com> wrote:

> Hi,
> 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,
> Louis
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it
> now.
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list