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 : Error Help in report dataSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Error Help in report data 
 Author   Message 
  Mark 
  
 Group: Members 
 Posts: 8 
 Joined: 2007-01-04 
 Profile
 Posted : 2007-01-15 16:48:30
Im getting the following error when I run a query for a given user based on their listid:

PHP Fatal error:  Uncaught exception 'com_exception' with message 'Source: Microsoft OLE DB Provider for ODBC Drivers
Description:
[QODBC] Error: 3120 - Object "90001-1141970274" specified in the request cannot be found. 

QuickBooks error message: Your version of this record has a different deleted count than the one in the datafile.

I have no idea what to do to fix this... 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-15 20:51:33
You didn't provide the SQL you are using, so I can't guess, but either the ListID: 90001-1141970274 doesn't exist for the table you are referencing, you are referencing the wrong company file, or you are trying to do an operation that isn't possible or allowed. 

  Top 
  Mark 
  
 Group: Members 
 Posts: 8 
 Joined: 2007-01-04 
 Profile
 Posted : 2007-01-16 08:51:50
Sorry, here is the SQL

sp_report BalanceSheetDetail show Blank, RunningBalance
parameters DateFrom = {d'".$date."'},
DateTo = {d'".$date."'},
AccountFilterListIDs = '".$listid."'

This is done in PHP, surely enough when I run this query for the listID given, nothing gets returned, so when I do the code:

$rs = $conn->Execute("sp_report BalanceSheetDetail show Blank, RunningBalance parameters DateFrom = {d'".$date."'}, DateTo = {d'".$date."'}, AccountFilterListIDs = '".$listid."'");

$rs->MoveFirst(); //HERE IS THE ERROR!

So if i get no results for that user, why would I get en exception on the line stated?

Is there anyway to check if the $rs variable has values before trying to move to the first one? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-01-16 10:41:03

You can use the Account name instead of ListID like this:

sp_report BalanceSheetDetail show Blank, TxnType, RunningBalance
parameters DateFrom = {d'2007-12-01'},
DateTo = {d'2007-12-15'},
AccountFilterFullNames = 'Checking'

In your PHP:
$rs = $conn->Execute("sp_report BalanceSheetDetail show Blank, RunningBalance parameters DateFrom = {d'".$date."'}, DateTo = {d'".$date."'}, AccountFilterListIDs = '".$listid."'");

you need to test if there's an error here first before doing:

$rs->MoveFirst();

because if the report fails to run, no query gets returned to the record set.

 

 

  Top 
  Mark 
  
 Group: Members 
 Posts: 8 
 Joined: 2007-01-04 
 Profile
 Posted : 2007-01-16 10:44:14
I see what your saying.

thanks for the tips, we just found the error too, it turns out that the used with the list id given in the error was not even in quickbooks anymore!
 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to