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 : reading boolean (bit) type fields resutls in incorrent dataSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 reading boolean (bit) type fields resutls in incorrent data 
 Author   Message 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2007-03-27 09:45:22

when reading boolean fields like Invoice.IsPaid or SalesOrderLine.SalesOrderLineIsManuallyClosed then it does not return the correct value.  when looking in QB the IsManuallyClosed field is set to true, however when using the VB Demo app to query the order the field shows as false.

Is there something special that i am missing to read these fields correctly.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-27 11:45:42

I'm not to sure what you mean here? Can you be any more vague? I use the IsPaid column all the time. 0 means false and 1 means true. 

See: How do I run a Open Invoices Report? 
        How do I run a Customer Balance Detail Report? 

 

  Top 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2007-03-27 20:07:54

sry I had to go out and wanted to get something up here quickly before leaving, hence the quick explanation.  here is a longer explanation

I have a Quickbooks datafile with 1 sales order which has 10 lines.  Looking at the order in the QUickbooks interface it shows that 3 of the lines are manually closed.

When viewing the salesorderline table using the vb demo app supplied with QODBC, it shows that the salesorderlineIsManuallyClosed field has a value of 0 (false) for all 10 lines.  I would expect it to show a 1 (true) for the 3 lines that show as closed in Quickbooks interface.

The problem is intermittant and not just related to the IsManuallyClosed field.  I have also noticed that other boolean type fields like IsPaid on the Invoice table also report 0 when they should be 1.

This problem happens most often on transactions that have just been inserted using QODBC.  I have not yet found a reliable way of getting an accurate result.  Even putting UNOPTIMIZED on the sql statement does not always return the correct value.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-27 20:26:33

IsPaid is a Invoice flag and not a InvoiceLine flag. Likewise IsManuallyClosed and IsFullyInvoiced are SalesOrder flags and not SalesOrderLine flags. These flags are all header table flags even though they can be seen in their transaction line tables, just like shipping addresses which obviously are not in every sales order line etc. Both InvoiceLine and SalesOrderLine contain most of the columns of their header tables along with the actual transaction line details.

The behaviour of the Intuit qbXML SDK is not the same as within QuickBooks. These flags are only true when the whole Invoice is Paid or the whole SalesOrder is invoiced, not individual lines.

 

  Top 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2007-03-27 20:42:39

when I look at the SalesOrderLine table I see the following fields (i have qualified with the table name for clarity)

SalesOrderLine.IsManuallyClosed

SalesOrderLine.SalesOrderLineIsManuallyClosed

It is this second field that I am referring to.  due to the field name having the SalesOrderLine prefix I assume that this field is in fact a field on the line rather than a header table field.

I have a similar problem with the IsPaid on the Invoice table (note  - invoice table, not the line table in this case)

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-27 21:07:10

I just closed the first line of this Sales Order:

and then immediately queried the SalesOrderLines for S.O. Number 1006 and SalesOrderLineIsManuallyClosed is true (1) as expected for the first line.

 

  Top 
  cameron 
  
 Group: Members 
 Posts: 17 
 Joined: 2006-03-22 
 Profile
 Posted : 2007-03-29 10:23:20

here is some screenshots from our system.  it is running QODBC v6.0.0.176 and QuickBooks Premier 2004/2005 NZ.

 this first shot shows the Sales Order in Quickbooks with the closed lines.  note one line is not closed.

the second picture is a query against the same database for order 396.  note that all the SalesOrderLineIsManuallyClosed fields show false.

is this a problem that was present in the older quickbooks but has since been fixed?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-29 10:53:02
Please update to QODBC v7.00.00.214, see: How can I get the latest version of QODBC?  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to