Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 15: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, 16:30
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,539
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

pre-order my book Simply SQL from Amazon
Reply With Quote
  #3 (permalink)  
Old 08-13-08, 16:36
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 813
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, 11: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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On