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 can I get a list of tables available via ODBC like "SELECT * FROM sysobjects WHERE..."?Search Forum

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

 New Topic 
 
 Post Reply 
 How can I get a list of tables available via ODBC like "SELECT * FROM sysobjects WHERE..."? 
 Author   Message 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-02-22 12:59:23
There is a stored procedure that will return a recordset with all the table information.

sp_tables

Or you can use the ADO schema object:
Const adSchemaTables = 20
Dim oConnection
Dim oSchema
Set oConnection = CreateObject("ADODB.Connection")
oConnection.Open "DSN=Quickbooks Data;OLE DB Services=-2"
Set oSchema = oConnection.OpenSchema(adSchemaTables)
Do While (not oSchema.EOF)
             MsgBox oSchema.Fields("Table_Name").Name & ": " &
oSchema.Fields("Table_Name").Value
             oSchema.MoveNext
Loop
oSchema.Close
oConnection.Close
 

  Top 
 New Topic 
 
 Post Reply 

Jump to