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 : What is wrong with this query to update TimeTracking table using Linked Server on SQL 2005?Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 What is wrong with this query to update TimeTracking table using Linked Server on SQL 2005? 
 Author   Message 
  Rajib Bahar 
  
 Group: Members 
 Posts: 8 
 Joined: 2008-01-08 
 Profile
 Posted : 2008-02-08 09:42:20
I have setup a linked server called QUICKBOOKS_DATA. What is wrong with the query below? The error is complaining about a field that is not allowed in insert. I do not know which field is/are disallowed during insertion. Thanks in advance for the help.

-------------------
INSERT INTO QUICKBOOKS_DATA...TimeTracking (TxnID, TimeCreated, TimeModified, 
TxnNumber, TxnDate, TxnDateMacro, EntityRefListID, EntityRefFullName, CustomerRefListID,                         
CustomerRefFullName, ItemServiceRefListID, ItemServiceRefFullName,  DurationMinutes,
ClassRefListID, ClassRefFullName, BillableStatus )
SELECT        '0000000', getdate(), getdate(), 
'12345', '2/2/2008', getdate(), '80000182-1197387266', 'Rajib Bahar', '80000172-1195590502',                         
'Proj00:Proj03', '8000006E-1197387831', 'Employee Consulting:Rajib Bahar',  600,
'30000-1148588106', 'Minneapolis:MSP - Consultant', 'Billable'
--------
 

 
Rajib Bahar
http://www.rajib-bahar.com
http://www.icsql.com
http://www.youtube.com/icsql 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-02-08 10:07:02

First of all, not all columns in any QODBC table are insertable. A number of columns are automatically maintained by QuickBooks and are READ ONLY. For the schema rules for any QODBC table do:

sp_columns Tablename

There's also formating required for dates.

Please see:
How are dates formatted in SQL queries when using the QuickBooks generated time stamps? 
How do I do INSERTs, UPDATEs and DELETEs using OPENQUERY with Linked MS SQL Servers? 
How do I insert data into the Timetracking table? 
for more information.

 

  Top 
  Rajib Bahar 
  
 Group: Members 
 Posts: 8 
 Joined: 2008-01-08 
 Profile
 Posted : 2008-02-08 10:17:25
Thanks. This post helped me resolve the issue. 

 
Rajib Bahar
http://www.rajib-bahar.com
http://www.icsql.com
http://www.youtube.com/icsql 
 
  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to