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
|
|
ItemInventory Table Missing Data |
Author |
Message |
Chip |
|
Group | : Members |
Posts | : 2 |
Joined | : 2007-07-06 |
|
Profile |
|
Posted : 2007-07-06 01:02:36 |
Hi,
I have been using some code I wrote several versions ago to generate inventory MRP reports. When I upgraded to the latest version of QODBC(to get vista working) it quit working.
The source of the error appears to be data missing from the ItemInventory table. I linked to the table in access to verify what I am seeing and the fields exists:
QuantityOnHand, TotalValue, InventoryData, AverageCost, QuantityOnOrder, QuantityonSale
But the data is no longer present for any of my inventory items. Any idea what may be going on? All of the other fields still appear populated...
thanks, Chip |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-07-06 09:42:31 |
The columns names given are incorrect, but:
Select QuantityOnHand, TotalValue, InventoryDate, AverageCost, QuantityOnOrder, QuantityonSalesOrder from ItemInventory
worked without a problem on Microsoft Windows Vista and QuickBooks 2007:
Try rebuilding your optimizer table by running:
sp_optimizefullsync ItemInventory |
|
|
|
Chip |
|
Group | : Members |
Posts | : 2 |
Joined | : 2007-07-06 |
|
Profile |
|
Posted : 2007-07-06 23:48:55 |
Thanks for the quick reply and sorry for the typo in my table list, you correctly assumed the last one as QuantityonSalesOrder
I ran your query and got correct results as you did. However when I run "Select * from ItemInventory" all the columns listed are returned as null values. This happens consistently and also after executing the sp_optimizefullsync as you suggested.
Thanks, Chip |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-07-07 13:20:33 |
My recommended settings for using the QODBC optimizer are shown here:
See: How do I setup the QODBC Optimizer? Where are the Optimizer options? for an explaination of all the options available to you.
The ItemInventory columns/fields affected by Null/Dirty Reads/Real Time settings are:
- QuantityOnHand
- TotalValue
- AverageCost
- QuantityOnOrder
- QuantityOnSalesOrder
When you do a: SELECT * when "For balances and stock quantities" is set as NULL, then the values are returned as NULLS. You can change the optimizer to use dirty reads, or stop using SELECT * and specify the fields instead like this:
Select QuantityOnHand, TotalValue, InventoryDate, AverageCost, QuantityOnOrder, QuantityonSalesOrder from ItemInventory |
|
|
|
|
Posted : 2008-07-09 04:03:32 |
I am having a similar problem that seem to crop up randomly after after the queries work fine dozens of time.
I have followed your recommendations for the optimizer without success.
When I run a simple make table query that pulls all the fields from ItemInventory (not select * but select ListID, TimeCreated, etc., etc.), I get nulls for on hand, on order, etc. When I run an even simpler query, the one you have at the end of your post, where I ONLY select Name, QuantityOnHand, it works fine.
So what's the root cause? I have what I consider a duct-tape-work-around in place but I am super concerned that the queries are not reliable (which tends to destroy a good night's sleep). |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-07-09 07:28:18 |
I would hazard to guess that either the MAKE TABLE actually does a SELECT * underneath or your connection string in MS Access still stores the original optimizer settings when you first linked the QODBC tables. You will need to change the optimizer to use dirty reads, rebuild the table using:-
sp_optimizefullsync ItemInventory
and then unlink the all the tables and re-link them. Try using VB Demo to confirm QODBC is actually working correctly.
See: How do I use the VB Demo for testing? |
|
|
|
|