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 : SQL Exception inserting dateSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 SQL Exception inserting date 
 Author   Message 
  Mike Andrews 
  
 Group: Members 
 Posts: 2 
 Joined: 2006-12-18 
 Profile
 Posted : 2006-12-19 00:09:56
Guys,

I've purchased the QODBC read/write single user edition and I've read as much as I can find on this particular problem from the forums.
However, I am not able to insert dates.  I get an exception every time.

I'm using the .NET framework 2.0.
Here's my sample sql statement:
INSERT INTO Invoice (    
    BillAddressAddr1,
    BillAddressAddr2,
    BillAddressAddr3,                      
    BillAddressCity,
    BillAddressState,
    BillAddressPostalCode,                      
    CustomerRefFullName,
    CustomerRefListID,
    DueDate,                      
    Memo,
    RefNumber,
    SalesTaxPercentage,
    SalesTaxTotal,
    Subtotal)
VALUES (        'xxxxxx',            'xxxxxx',            'xxxxxxxx',            'xxxxx',            'xx',            'xxxxx',           
        'xxxxxx',            'xxxxxx-xxxxxxxxxx',            {ts '2006-05-25 00:00:00.000'},            '',            'xxxx',           
        000.00,            00.00,            000.0 )

When I run this against the database using the ODBCCommand.ExecuteNonQuery() I get this exception:
ERROR [42S00] [QODBC] Invalid operand for operator: <assignment>

I've tried everything I can think of and I still cannot get this to work.
Please help.

Thanks,
Mike 

 
Mike Andrews 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-12-19 10:34:39

DueDate is a Date, not a TIMESTAMP. The format is {d '2006-05-06'}

See: How are dates formatted in SQL queries when using the QuickBooks generated time stamps? for more.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to