Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question What is wrong? I got an error

    strsql = "SELECT LPNum, LPName, LPAddress, LPCity, LPState, LPZip5, LPZip4, LoanNumber, Action " & _
    "FROM " & InfoB & _
    " WHERE PolicyCSPNum = " & "'" & PolicyCSPNum & "'" & " VehicleNum = " & "'" & strVehicleNum & "'" & " AND Action = 'A'" & _
    " ORDER BY LPNum"

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    What was the error and what server-side language are you interfacing with the database with?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's complaining about the syntax. ...I don't see any wrong on that one

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    I see several potential problems but I would still like to know what server-side language you are using and specifically what the error stated before I point out what I think is wrong.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    New Coder
    Join Date
    Oct 2002
    Location
    nj
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You are missing the KEYWORD 'AND" between WHERE clause, below is the corrected SQL statement.


    strsql = "SELECT LPNum, LPName, LPAddress, LPCity, LPState, LPZip5, LPZip4, LoanNumber, Action " & _
    "FROM " & InfoB & _
    " WHERE PolicyCSPNum = " & "'" & PolicyCSPNum & "'" & " AND VehicleNum = " & "'" & strVehicleNum & "'" & " AND Action = 'A'" & _
    " ORDER BY LPNum"


  •  

    Posting Permissions

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