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 : How do I add a Inventory Item using QODBC?Search Forum

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

 New Topic 
 
 Post Reply 
 How do I add a Inventory Item using QODBC? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-21 12:19:11

This is an example of how to add an ItemInventory Item. You can also use the stored procedure "sp_lastinsertid ItemInventory" immediately after the insert statement to retrieve a recordset that has the ListID of the new item you just inserted.

INSERT INTO ItemInventory ("Name", "IsActive", "SalesDesc", "SalesPrice", "IncomeAccountRefListID", "PurchaseDesc", "PurchaseCost", "COGSAccountRefListID", "PrefVendorRefListID", "AssetAccountRefListID", "ReorderPoint", "QuantityOnHand", "TotalValue", "InventoryDate") VALUES ('NewItemInventory', TRUE, 'SalesNew', 0.0013, '1A0000-933270542', 'PurchaseNew', 0.005, '1E0000-933270542', 'A40000-1197774038', '60000-933270541', 25.0, 50.0, 10.0, {d'2005-10-07'})

And looks like this in the USA Sample Rock Castle Consturction company file in QuickBooks 2006:

But before you add any new Inventory Items, you should check the ITEM table first to see if the new Inventory Item Name is not already used in QuickBooks. The ITEM table is a combined list of all Item tables in QuickBooks: ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, and ItemGroup; with minimum common fields.

When inserting a new ItemInventory item the Name can't already be, for example, a ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, or ItemGroup FullName already. It must be a unquie new ITEM FullName!

To see the item fullnames, you can run the following query in VB Demo:

SELECT ListID, FullName, Description, Type FROM Item

In my case, my Australian QuickBooks 2004 sample file returned the following items:

And like ITEM there's a ENTITY table that's the combined list of all entity tables in QuickBooks: Customers, Employees, Othernames, and Vendors; with minimum common fields.

So when inserting a new Customer name the FullName can't be, for example, a Customer, Employee, Othername, or Vendor already. It must be a unquie new ENTITY FullName in QuickBooks!

 

  Top 
 New Topic 
 
 Post Reply 

Jump to