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 : [QODBC] Invalid operand for operator: <assignment>Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 [QODBC] Invalid operand for operator: <assignment> 
 Author   Message 
  Tim 
  
 Group: Members 
 Posts: 4 
 Joined: 2007-04-18 
 Profile
 Posted : 2007-04-18 15:00:00

Attempting the following insert to the Customer table via VB Demo 32 generates the error:

[QODBC] Invalid operand for operator: <assignment>

INSERT INTO "Customer" ("Name", "FullName", "CompanyName", "BillAddressAddr1", "BillAddressAddr2",
"BillAddressAddr3","BillAddressAddr4","BillAddressCity","BillAddressState","BillAddressPostalCode",
"ShipAddressAddr1","ShipAddressAddr2","ShipAddressAddr3","ShipAddressAddr4","ShipAddressCity","ShipAddressState",
"ShipAddressPostalCode","Phone","AltPhone","Fax","Email","Contact","AltContact","TermsRefListID","SalesRepRefListID",
"SalesTaxCodeRefListID","ResaleNumber","AccountNumber","CreditLimit","PreferredPaymentMethodRefListID",
"CreditCardInfoCreditCardNumber","CreditCardInfoExpirationMonth","CreditCardInfoExpirationYear","CreditCardInfoNameOnCard",
"CreditCardInfoCreditCardAddress","CreditCardInfoCreditCardPostalCode") VALUES ('ABC Test Company', 'ABC Test Company',
'ABC Test Company','1234 Main Street','Suite 111','West','East','Tampa','FL','12345','1234 Main Street','Suite 111','West',
'East','Tampa','FL','12345', '123-456-7893','','213-456-7896','joe@somewhere.com','Joe Smith','John Smith','123-456-7893','',
'80000001-1173127503','10000-1090246205','215478','123456789',1000.00,'30000-1090246429','', 01 ,2007 ,
'9999999999999999999999999','1234 Main Street','34639')

Any ideas or direction would be appreciated. Thanks

 

 

  Top 
  Tim 
  
 Group: Members 
 Posts: 4 
 Joined: 2007-04-18 
 Profile
 Posted : 2007-04-18 23:28:27

Okay, bonehead move on my part .... coding too late ... eyes crossed.

The number of values exceeded the number of fields. Doh!

Now I have a "field not allowed in insert" error .... I'll have to find the reserve word list and compare that to my field names, based on the Customer table detail sheet all of the fields I am inserting are optinal save the Name field which is a required insert.

And so it goes.......

 

 

 

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

"FullName" is actually created by QuickBooks when a customer is created and is not insertable as shown using:-

sp_columns customer

So once FullName is removed and the extra value deleted and my listids subsituted for those in the company file I'm using, this query executed without errors:-

INSERT INTO "Customer" ("Name","CompanyName", "BillAddressAddr1", "BillAddressAddr2",
"BillAddressAddr3","BillAddressAddr4","BillAddressCity","BillAddressState","BillAddressPostalCode",
"ShipAddressAddr1","ShipAddressAddr2","ShipAddressAddr3","ShipAddressAddr4","ShipAddressCity","ShipAddressState",
"ShipAddressPostalCode","Phone","AltPhone","Fax","Email","Contact","AltContact",
"TermsRefListID","SalesRepRefListID","SalesTaxCodeRefListID","ResaleNumber","AccountNumber","CreditLimit",
"PreferredPaymentMethodRefListID","CreditCardInfoCreditCardNumber","CreditCardInfoExpirationMonth",
"CreditCardInfoExpirationYear","CreditCardInfoNameOnCard","CreditCardInfoCreditCardAddress",
"CreditCardInfoCreditCardPostalCode") VALUES
('ABC Test Company', 'ABC Test Company','1234 Main Street','Suite 111',
'West','East','Tampa','FL','12345',
'1234 Main Street','Suite 111','West','East','Tampa','FL',
'12345', '123-456-7893','','213-456-7896','joe@somewhere.com','Joe Smith','John Smith',
'10000-933272658','80000001-1197762860','20000-999022286','215478','123456789',1000.00,
'60000-933272660','', 01 ,
2007 ,'Tom','1234 Main Street TAMPA',
'34639')

and the new customer record was created in QuickBooks:

 

  Top 
  Snap Communications 
  
 Group: Members 
 Posts: 9 
 Joined: 2007-11-22 
 Profile
 Posted : 2007-11-22 15:48:31
How can I delete an entire invoice programmatically.. This is for QBOE. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-11-23 07:29:15

DELETE FROM Invoice WHERE TxnID = 'xxxxx' 

Where 'xxxxx'  is the transtaction ID that you want to delete.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to