Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : I am having problems with the Desc field in the Account table using a select statement?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
[1]  
 I am having problems with the Desc field in the Account table using a select statement? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-13 08:41:26
I am having problems with the Desc field in the Account table using a select statement.

This Fails:
SELECT ListID, TimeCreated, TimeModified, Name, IsActive, ParentRefListID, ParentRefFullName, Sublevel, AccountType, AccountNumber, BankNumber, Desc, Balance From Account Where IsActive = 1

While this Works:
SELECT ListID, TimeCreated, TimeModified, Name, IsActive, ParentRefListID, ParentRefFullName, Sublevel, AccountType, AccountNumber, BankNumber, Balance From Account Where IsActive = 1

If I attempt to access anything in the recordset I receive:
Err 3704 Error: Operation is not allowed when the object is closed.
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-04-13 08:47:18

The problem here is that DESC is the reserved SQL word for DESCENDING. So what you need to do is to place double quotes around any "DESC" column used in QODBC like this:

SELECT ListID, TimeCreated, TimeModified, Name, IsActive, ParentRefListID,
ParentRefFullName, Sublevel, AccountType, AccountNumber, BankNumber,
"Desc", Balance From Account Where IsActive = 1

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to