If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > SQL Query syntax error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-13-08, 14:37
ohiocowboy ohiocowboy is offline
Registered User
 
Join Date: Jun 2006
Posts: 11
SQL Query syntax error

I have a SQL statement that always stops with a SYNTAX error.
sql = sql & "(PBID IDENTITY, "
sql = sql & "CustID Char(20) NOT NULL, "
sql = sql & "CustContact Char(30), "
sql = sql & "CustPhone Char(20), "
sql = sql & "CustExt Char(6), "
sql = sql & "CustFax Char(20), "
sql = sql & "CustEMail Char(30), "
sql = sql & "PITAFact Char(2), "
sql = sql & "ReceivedBy Char(2), "
sql = sql & "URL Char(50), "
sql = sql & "UserName Char(20), "
sql = sql & "Password Char(20), "
sql = sql & "ShipAdd1 Char(50), "
sql = sql & "ShipAdd2 Char(50), "
sql = sql & "ShipAddCity Char(30), "
sql = sql & "ShipAddState Char(2), "
sql = sql & "ShipAddZip Char(14)) "
Set rs = Conn.Execute(sql)

It always error out on line 12 with the Column Name Password

If I delete the Column - No Error
If I change the name to Password2 - No Error

Is Password a reserved name in Pervasive V10?
Thanks,
Paul
Reply With Quote
  #2 (permalink)  
Old 08-13-08, 15:30
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
well, i don't know pervasive at all, but i'll bet the answer is yes

with the testing you've done, why do you still have doubts?

and why can't you name the column pswd or something?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 08-13-08, 15:36
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Yes, Password is a reserved word. You can either rename the column or enclose it in double quotes:
CREATE TABLE pwdTest ("Password" char(20))
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #4 (permalink)  
Old 08-18-08, 10:54
ohiocowboy ohiocowboy is offline
Registered User
 
Join Date: Jun 2006
Posts: 11
Thanks, my copy of the Pervasive documentation did not include PASSWORD in the reseved word list. It was allowed in V8.7. My procedure for creating the table stopped working when we upgraded to V10.

Thanks again,
Paul
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On