ASP error, help its killing me

Results 1 to 3 of 3

Thread: ASP error, help its killing me

  1. #1
    Join Date
    Dec 1969
    Posts
    10

    Default ASP error, help its killing me

    Hi, <BR>I want to know if the following statement is correct, <BR><BR>strsql= "select * from tableneme where columnA= "&request.form("param") <BR><BR>where param is the hidden value passes from another asp page. <BR>When i execute this asp, i get the error as, <BR><BR>connection was successful <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression &#039columnA =&#039. <BR><BR>/column.asp, line 19 <BR><BR>Line 19 is the above sql statement. <BR>Help, <BR>Thanks <BR><BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    128

    Default RE: ASP error, help its killing me

    SQL is not my strong point but try putting single quotes around the param. Also, put a response.write strsql before the execute to see what you are generating.

  3. #3
    ActiveALLI Guest

    Default RE: ASP error, help its killing me

    What you are doing is probably right if it is number witch is stored in the variable param.<BR>How ever if it is a string you should but single quotes around it.<BR>So if it is a number (integer)<BR>strsql= "select * from tableneme where columnA = " & request.form("param")<BR>But if it is a string<BR>strsql= "select * from tableneme where columnA = &#039" & request.form("param") & "&#039"<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •