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 : Data provider or other service returned an E_FAIL statusSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Bug Reports

 New Topic 
 
 Post Reply 
[1]  
 Data provider or other service returned an E_FAIL status 
 Author   Message 
  Greg Reznik 
  
 Group: Members 
 Posts: 1 
 Joined: 2006-08-17 
 Profile
 Posted : 2006-08-18 00:04:11
I'm writing a VB6 application that will access QuickBooks 2006 database. I'm using registered read/write QODBC driver and some of the tables are unaccessible while others can be accesses with no problem.  For example, while trying to read [Item] table, I receive the following error: [Error #2147467259 Description: Data provider or other service returned an E_FAIL status.]. At the same time, I can access [ItemInventory] table just fine. I tried to use adUseClient as well as adUseServer type of cursor - though adUseServer type of cursor allows faster data access, I still cannot get to the data table. Can anyone tell me what this is all about and what can be done to correct this issue? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-18 14:00:16
Try changing the ADO cursor type to:

Const adUseServer = 2
oRecordset.CursorLocation = adUseServer

And just in case you try switching everything to adUseServer, please be aware stored procedure calls like sp_tables only like adUseClient cursor types. The Item table is also a read only table.
 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2007-12-14 11:02:09
I get this  (Data provider or other service returned an E_FAIL status.
) error on several books with following SQL statement:

SELECT  BillPaymentCheck.TxnDate as Payment_Date,
BillPaymentCheck.RefNumber as Check_Num,
BillLinkedTxn.VendorRefFullName as Vendor_Name,
BillLinkedTxn.TxnDate as Bill_Date,
BillLinkedTxn.RefNumber as Bill_No,
BillLinkedTxn.DueDate as Bill_Due_Date,
BillLinkedTxn.AmountDue as Bill_Amount_Due,
BillPaymentCheck.Amount as Amount_Paid
FROM BillLinkedTxn, BillPaymentCheck
WHERE BillLinkedTxn.LinkedTxnTxnID = BillPaymentCheck.TxnID
AND (((BillLinkedTxn.TxnDate)>={d '2007-01-01'} And (BillLinkedTxn.TxnDate)<={d '2008-12-31'}))
AND BillLinkedTxn.IsPaid = 1

    objQBRecordSet.CursorLocation = adUseClient ' adUseServer
    'objQBDataCon.Open "DSN=" & DatabaseName & ";OLE DB Services=-2;"
    objQBRecordSet.Open ReportCommandText, objQBDataCon, adOpenStatic, adLockOptimistic

When I use adUseServer the recordset abruptly terminates after retrieving a few records.

What should I do to fix this error please?

Thank you,

Piyush 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-12-14 11:21:16

Try this combination:

Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3

oRecordset.CursorType = 2
oRecordset.LockType = 3
oRecordset.CursorLocation = adUseClient

 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2007-12-14 11:53:09
I tried it and did not help. The retrieval stopped after the same row. Piyush 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-12-14 12:25:55

Check the SQL Statement using VBDemo, and try:

SELECT  BillPaymentCheck.TxnDate as Payment_Date,
BillPaymentCheck.RefNumber as Check_Num,
BillLinkedTxn.VendorRefFullName as Vendor_Name,
BillLinkedTxn.TxnDate as Bill_Date,
BillLinkedTxn.RefNumber as Bill_No,
BillLinkedTxn.DueDate as Bill_Due_Date,
BillLinkedTxn.AmountDue as Bill_Amount_Due,
BillPaymentCheck.Amount as Amount_Paid
FROM BillLinkedTxn NOSYNC, BillPaymentCheck NOSYNC
WHERE BillLinkedTxn.LinkedTxnTxnID = BillPaymentCheck.TxnID
AND (((BillLinkedTxn.TxnDate)>={d '2007-01-01'} And (BillLinkedTxn.TxnDate)<={d '2008-12-31'}))
AND BillLinkedTxn.IsPaid = 1

also.

 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2007-12-18 06:26:26
No luck with NOSYNC attribute with my VB6 application. It still crashes.

I am using Microsoft ADO Version 2.8 library. Could that be a problem?. VB Demo 32 program brings all the rows correctly for all the books.
Piyush 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2007-12-19 07:58:53
Hi Tom,

Since the VB Demo 32 program fetches all the Vendor payment details flawlessly, where do I get the source code for that program please?

I will replace MS-ADO with whatever data access mechanism that program is using.

Thank you very much,

Piyush 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-12-19 08:08:43

Click here: Visual Basic ODBC Demo Program 32 bit Source Code (35k) and try looking at: Can I get some examples of how to use QODBC via Visual Basic? also.

 

  Top 
  Piyush Varma 
  
 Group: Members 
 Posts: 66 
 Joined: 2006-04-06 
 Profile
 Posted : 2008-02-26 06:30:38
I am using following where clause to retrieve amount paid values for vendor bills:

BillLinkedTxn.LinkedTxnTxnID = BillPaymentCheck.TxnID

I am using .Net's System.Data.Odbc namespace to access the QODBC data.

I have realized that LinkedTxnTxnID is not a Jumpin columns. It may not be indexed. Is that the reason for the query giving E_FAIL status and slow performance? Most of the results are under 700 rows.


Thanks,

Piyush 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to