missing operator

Results 1 to 2 of 2

Thread: missing operator

  1. #1
    Join Date
    Dec 1969

    Default missing operator

    I keep getting this error:<BR>Syntax error (missing operator) in query expression &#039;table_id =&#039;.<BR><BR>I am new at this, hoping maybe someone could shed some light on why I am getting this error. Here is my code:<BR><BR>SQLselect="Select * FROM table WHERE table_id = "&request("table_id")<BR>&#039;response.write(SQLs elect)<BR>&#039;set rsselect = connection.execute(SQLselect)<BR>set rsselect=Server.CreateObject("adodb.Recordset")<BR >rsselect.open SQLselect, connection ,adOpenStatic, adLockReadOnly, adCmdText

  2. #2
    Join Date
    Dec 1969

    Default Debug

    First, since your new, I&#039;d suggest you to use variables<BR><BR>Dim intMyID<BR>intMyID = Cint(Trim(request("table_id")))<BR><BR>SQLselect = "SELECT * FROM table WHERE table_id = " & intMyID<BR>Response.Write SQLselect & "&#060;hr&#062;"<BR>Response.End

Posting Permissions

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