×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reserved Name in Pervasive

Reserved Name in Pervasive

Reserved Name in Pervasive

(OP)
We are using something called DbNetGrid to create web pages that display info from a Pervasive SQL ACCPAC system.  When we try to read the Desc field holding product descriptions within ACCPAC we get an error telling us this is a reserved name.

The makers of DbNetGrid told us we may need to declare the table when trying to read this field, but could offer no advice as to the syntax to do this.

Any help would be appreciated.
 

RE: Reserved Name in Pervasive

If you're issuing a SQL statement, you use double quotes around reserved keywords.  For example:
select "desc" from table

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

RE: Reserved Name in Pervasive

This is the actual error message that is generated.

[Pervasive][ODBC Client Interface][Pervasive][ODBC Engine Interface]Syntax Error: select OEORDD.ORDUNIQ,OEORDD.DESC<< ??? >>,OEORDD.UNITPRICE,OEORDD.QTYORDERED,OEORDD.ORDUNIT,OEORDD.QTYSHIPPED,' ' as dbnetgrid_id from OEORDD where 1=1 and (OEORDD.ORDUNIQ = 158163) order by OEORDD.ORDUNIQ

Here is a section of the code that is generating this error:

with (document.all.dbnetgrid2)
     {
        
        fromPart = "OEORDD"
        orderColumn = "ORDUNIQ"
        columnPicker = "true"
        view = "true"
        selectPart = ["ORDUNIQ","DESC","UNITPRICE","QTYORDERED","ORDUNIT","QTYSHIPPED"];
        headings = ["Orduniq","Item","Price","QtyOrdered","Unit","QtyShipped"];
               

RE: Reserved Name in Pervasive

Never having worked with DbNetGrid (and not getting the email to download a trial), I don't know why it's doing this but there might be a way to delimit reserved keywords.  You might try adding double quotes like:
selectPart = ["ORDUNIQ","\"DESC\"","UNITPRICE","QTYORDERED","ORDUNIT","QTYSHIPPED"];
to see if that helps.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

RE: Reserved Name in Pervasive

IT WORKED!!!!!!
I Can't believe I didnt think of that. Or even better yet the manufacturer.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close