SQL problems

Results 1 to 3 of 3

Thread: SQL problems

  1. #1
    Al Bear Guest

    Default SQL problems

    I have an sql statment.<BR><BR>SQL2 = "SELECT temp FROM document" & objrec1("section")<BR>SQL2 = SQL2 & " WHERE id =" & id<BR><BR>response.write SQL2<BR><BR>objrec1("section") is a number.<BR>the error I am getting is objrec required "

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL problems

    Your SQL statement makes no sense. <BR><BR>SELECT afield FROM atable and recordsetobject WHERE ...<BR><BR>Not proper syntax

  3. #3
    Reggie Guest

    Default RE: SQL problems

    A few possible problems/suggestions:<BR><BR>-Do you actually get a value when you response.write objrec1("section")? <BR>-You may have to convery objrec1("section") to a string to concatenate it to document.<BR><BR>If all else fails try using if statements and troubleshooting from there. (i.e. if objrec1("section")=1 then SQL2="select temp from document1 WHERE id="&id end if)

Posting Permissions

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