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 : Missing Column, No DataSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Missing Column, No Data 
 Author   Message 
  Robin Peckham 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-04-22 
 Profile
 Posted : 2008-01-10 04:09:36

Hello Tom,

 

Let me start off by apologizing for the length of my request.  I will beg for your forgiveness and any advice you might be able to give me would be greatly appreciated.

 

I will start off with the background info.  I set up a Whiteboard at work that queries QB every hour to get updated sales orders.  This query takes about 10 seconds to run.  Last week, we sent our company file to Data Services to have them fix some corrupted data.  When we received the file back, QODBC optimized as expected but after that, it could no longer query without connection issues.  Since the file name was changed, I reconfigured the ODBC to point to the new file but that still failed.  After a few more attempts, I updated the QODBC from v7 to v8.  We are currently running Enterprise Solutions 7.0.

 

The update to v8 made it possible to connect again without error.  I set up the ODBC as before and ran the query.  I received an error that the column SalesOrderLineOther1 could not be found.  However, that column shows up in MSQuery.  I removed it from my SQL and the query ran.  After about 20 minutes, no data was returned but it did run to completion.  It should have returned at least 20 records.  Each additional runs also take 20 and return no data.  This is also the case using MSQuery.  If I try to reconfigure QODBC (and remove optimizer just for testing purposes), I do not see my settings but when I save using DSN QODBC N, it asks to overwrite so I assume my settings are saved but are just not apparent.

 

What I am asking of you is to help me rule out possibilities so that I can figure it out once and for all.  I find it difficult to believe QODBC could be the issue because it ran fine before we sent our file and failed after it.  However, just to be sure, I will include my script and ODBC settings.  Thanks in advance for your help and having to read this book.

 

VBA script:

'set up connection string

 

sConnectString = "DSN=QODBC N"

 

       

 

'set up SQL

 

 sSQL = "SELECT SalesOrderLineDesc, DueDate, SalesOrderLineItemRefFullName, SalesOrderLineQuantity, PONumber, SalesOrderLineAmount, SalesOrderLineClassRefFullName, RefNumber, CustomerRefFullName, TxnDate, SalesOrderLineOther1 FROM SalesOrderLine WHERE SalesOrderLine.TimeModified >= {ts '" & Format(Date, "yyyy-mm-dd") & " 00:00:00'}"

 

 

 

'set connections

 

Set oConnection = CreateObject("ADODB.Connection")

 

Set oRecordset = CreateObject("ADODB.Recordset")

 

       

 

'open qb

 

oConnection.Open sConnectString

 

oRecordset.Open sSQL, oConnection

 

 

'place in the data into whiteboard temp sheet

 

Do While (Not oRecordset.EOF)

     this is lengthy and irrelevant

Loop

 

’close out of the string

 

oRecordset.Close

 

Set oRecordset = Nothing

 

oConnection.Close

 

Set oConnection = Nothing

 

QODBC settings:

 

General Tab

Locate the company file and have browsed to location.

DSN = QODBC N

Opens same as company file

Optimizer

 

            Default optimizer database folder

The start of every query is selected

Real Time balances

Multi-table Sync

All Other tabs

 

Everything else is in default state

 

Thanks so much!  Please let me know what else you might need.

 

Robin Peckham

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-01-10 16:12:32

The SalesOrderLineOther1 column is now called CustomFieldSalesOrderLineOther1. Change your VBA script to use the QuickBooks Data DSN (not the old QODBC N DSN) and run the query to call QuickBooks directly (bypassing optimizer update operations) like this:-

'set up connection string
sConnectString = "DSN=QuickBooks Data"

'set up SQL

 sSQL = "SELECT SalesOrderLineDesc, DueDate, SalesOrderLineItemRefFullName, SalesOrderLineQuantity, PONumber, SalesOrderLineAmount, SalesOrderLineClassRefFullName, RefNumber, CustomerRefFullName, TxnDate, CustomFieldSalesOrderLineOther1 FROM SalesOrderLine calldirect WHERE SalesOrderLine.TimeModified >= {ts '" & Format(Date, "yyyy-mm-dd") & " 00:00:00'}"

 

  Top 
  Robin Peckham 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-04-22 
 Profile
 Posted : 2008-01-11 13:26:51

Thank you so much, Tom!  With your help, I was finally able to get my query up and running again.  I knew you were the person to ask!

Robin

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to