need SQL help

Results 1 to 2 of 2

Thread: need SQL help

  1. #1
    Join Date
    Dec 1969

    Default need SQL help

    Hi<BR><BR>I am writing an SQL statement in VB 5.0<BR><BR>I am getting a Too few parameters: expected 1 error.<BR><BR>strSQL = "SELECT tblusers.RO FROM tblusers WHERE ((tblusers.RO = true) AND (tblusers.username = (" & pUser & ")));"<BR><BR>I believe this is only a syntax error.<BR><BR>Any help or advice would be appreciated.

  2. #2
    Medieval Dude Guest

    Default RE: need SQL help

    I would cut out all the parens for simplicity sake. You don&#039;t need to specify tblusers with each field name since that&#039;s the only table yer selecting from. I think you want single quotes around pUser. Also, I don&#039;t know about the semicolon at the end. I think that may give SQL some problems. Try this:<BR>strSQL = "SELECT RO FROM tblUsers WHERE RO = true AND username = &#039;" & pUser & "&#039;"

Posting Permissions

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