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 : SP_LastInsertID Invoice Connection BrokenSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 SP_LastInsertID Invoice Connection Broken 
 Author   Message 
  GrafR 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-06-02 
 Profile
 Posted : 2006-06-02 04:53:23

Whenever I try the following in MS-SQL Query Analyzer, I get an error

INSERT OPENQUERY(QUICKBOOKS,'
Select "CustomerRefListID",
"InvoiceLineItemRefListID",
"InvoiceLineDesc",
"InvoiceLineRate",
"InvoiceLineAmount",
"InvoiceLineSalesTaxCodeRefListID",
"FQSaveToCache" from InvoiceLine where 1=0')
VALUES
('20000-1148055137',
'10000-1148057485',
'Bin Permit Renovations',
333.00000, 333.00,
'20000-1148054907',
1)
go
INSERT OPENQUERY(QUICKBOOKS,'
Select "CustomerRefListID" from Invoice')
Values
('20000-1148055137')
GO
select * from openquery(QUICKBOOKS, 'SP_LastInsertID Invoice')
go

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

Connection Broken

I thought maybe it had to do with the 2 Insert statements, so I tried just

select * from openquery(QUICKBOOKS, 'SP_Tables')

I got the same error.

 

I am using MS SQL Server 2000 and the 6.0 version of QODBC, it's the latest download.

I have setup QUICKBOOKS as a Linked Server. I used information that I got from the forum to set all the parms.

Thanks!

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-06 08:43:31

Each statement needs to be executed as a seperate statement and you need to be using QODBC v6.00.00.176 in order for 'SP_LastInsertID InvoiceLine' to work.

 

  Top 
  GrafR 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-06-02 
 Profile
 Posted : 2006-07-07 00:18:20

I made sure that I am using version 176, and I am. From MS-SQLQuery Analyzer, I try to execute:

select * from openquery(QUICKBOOKS, 'SP_Tables')

I get:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

Connection Broken

And I also tried to insert an InvoiceLine item, and then run the sp_LastInsertID proc. And got the same error.

Any help would be most appreciated.


 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-07-07 08:01:40

Sorry, the QODBC SP_TABLES and SP_LASTINSERTID stored procedures cannot be currently called from SQL Server 2000 or 2005 linked tables.

To locate the last invoice for the customer you can do this instead:

SELECT  TOP 1 TxnID FROM Invoice WHERE CustomerRefListID = '20000-1148055137' ORDER BY TimeModified DESC

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to