Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-25-2002, 04:09 PM   PM User | #1
ClueLess
Regular Coder

 
Join Date: Nov 2002
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
ClueLess is an unknown quantity at this point
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"
ClueLess is offline   Reply With Quote
Old 11-25-2002, 04:34 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
What was the error and what server-side language are you interfacing with the database with?
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 11-25-2002, 05:11 PM   PM User | #3
ClueLess
Regular Coder

 
Join Date: Nov 2002
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
ClueLess is an unknown quantity at this point
It's complaining about the syntax. ...I don't see any wrong on that one
ClueLess is offline   Reply With Quote
Old 11-25-2002, 07:23 PM   PM User | #4
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 11-26-2002, 05:37 AM   PM User | #5
rcreyes
New Coder

 
Join Date: Oct 2002
Location: nj
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
rcreyes is an unknown quantity at this point
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"
rcreyes is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Advertisement
Log in to turn off these ads.