| SQL query returns no data |
| Author |
Message |
| John |
| |
| Group | : Members |
| Posts | : 5 |
| Joined | : 2007-07-04 |
|
| Profile |
|
| Posted : 2007-07-04 07:09:00 |
I am testing the ODBC driver. The "Test Connection to Quickbooks" in the the ODBC connection runs successfully. But when I use the VB Demo applicaiton, the sql queries are returning no data. The company file I am using has data in it for the tables I am querying. |
|
|
|
| Tom |
 |
| Group | : Administrator |
| Posts | : 5510 |
| Joined | : 2006-02-17 |
|
| Profile |
|
| Posted : 2007-07-04 08:42:00 |
|
|
|
| John |
| |
| Group | : Members |
| Posts | : 5 |
| Joined | : 2007-07-04 |
|
| Profile |
|
| Posted : 2007-07-05 02:40:40 |
| I can connect to the sample.qbw and the qbdc connection works. The VB Demo returns data from the Select queries. So at this point, I'm assuming the qbw file I am using for our company data may be corrupted. |
|
|
|
| Tom |
 |
| Group | : Administrator |
| Posts | : 5510 |
| Joined | : 2006-02-17 |
|
| Profile |
|
| Posted : 2007-07-05 08:09:55 |
Open your company file in QuickBooks and then in VB Demo try temporarily bypassing your optimizer settings and extract the latest information directly by using the unoptimized tag after the table name like this to your queries:
select * from InvoiceLine unoptimized where TxnDate >= {d'2007-03-01'}
If that works, you can resync your optimized InvoiceLine table by running:-
sp_optimizefullsync InvoiceLine
See also: How do I setup the QODBC Optimizer? Where are the Optimizer options? |
|
|
|
| John |
| |
| Group | : Members |
| Posts | : 5 |
| Joined | : 2007-07-04 |
|
| Profile |
|
| Posted : 2007-07-07 07:27:50 |
That didn't seem to work. For now, I'm just working with the sample.qbw file.
I'm trying to use Hibernate with the QODBC. Hibernate needs a dialect which is usually set to the database (SQLServer, Oracle, etc.). Do you know what I can set it for QODBC? |
|
|
|
| Tom |
 |
| Group | : Administrator |
| Posts | : 5510 |
| Joined | : 2006-02-17 |
|
| Profile |
|
| Posted : 2007-07-07 12:38:50 |
| Use VB Demo as it allows the SQL statements I given you to test your connection to your company file. Then try working with Hibernate afterwards. |
|
|
|