I am new to SQL language and QODBC. Basically I am linking MS Access to Quickbooks Enterprise V9 via QODBC. I linked table ItemInventory to MS Access, and I can change the data value, and it updates successfully. Then I create a blank form with a button, and I programmed when pressing a button, it will do the following:
CurrentDb.Execute "Insert INTO ItemInventory (ListID,EditSequence, Name, IncomeAccountRefListID, IncomeAccountRefFullName, COGSAccountRefListID, COGSAccountRefFullName, AssetAccountRefListID, AssetAccountRefFullName) VALUES ('80000006-1238800996', '8', 'Door8', '8000000A-1238800946', 'Merchandise Sales', '80000020-1238800986', 'Cost of Goods Sold', '80000006-1238800946', 'Inventory Asset')"
Then I clicked that button, I got this error: Run-time error '3113'; Cannot update 'EditSequence'; field not updatable So I temporary remove EditSequence from the SQL statement, and I clicked the button, and I got this error: Run-time error '3155'; ODBC -- insert on a linked table 'ItemInventory' failed. I tried to create a new table with slightly different table name and run that SQL statement, and it works fine. Questions: Q: What is EditSequence field? What value should I put? Q: How do I insert data into ItemInventory? Thanks! Bonpon |