Querying a database that is all linked tables.

CharlieMay

Active member
Joined
Jul 17, 2009
Messages
25
Location
Indiana
Programming Experience
10+
I am developing an application that gets information from Quickbooks. I am using a 3rd party ODBC driver QODBC (QODBC.com)that allows me to link an access database to the Quickbooks datafile. Can someone tell me what I need to do to connect to this database and query information through the linked table?

So I have an access database (QBData.mdb) and that database contains linktables to the quickbook datafile. Inside Access I can create a query and pull results.

From VB.Net I'm connecting to the database as if it was a normal database containing actual data instead of links but I get the following OleDbException "No value given for one or more required parameters"

Here is the basics of what I have"
dim qbService as new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " &_
"Data Source=" & "D:\Applications\qbdata.mdb")

qbservice.open
sstmt = "SELECT * FROM Invoice Where RefNumber = '10167'"
dim qbDB as New Oledb.OleDbCommand("sstmt, qbservice)
dim readQB as Oledb.OleDbDataReader = qbDB.ExecuteReader
While readQB.Read
txID = readQB("txnID")
CustID = readQB("CustomerRef_ListID")
end while
qbservice.close
Textbox1.text = txID
Textbox2.Text = CustID

The exception appears on the dim readQB... line

Am I even using the proper connection string to connect to a database that only contains linktables and no actual stored data?

Any help is greatly appreciated

Charlie
 
im trying to do something similar i am making a module that exports total $ of all sales done that day to a file but im on Quickbooks POS 8... its been a real challenge quickbooks developer network isnt updated often and the examples they have dont work. :(
 
OK, I've figured out what I was doing wrong. It appears that my Laptop which I just installed Quickbooks on has a new database structure than what I was originally messing with and that Intuit has renamed a lot of the columns AND tables so I wasn't calling the right column names. tonyz, have you checked out qodbc.com for their ODBC driver to quickbooks? I'm still testing it but I think it's going to do what I want. I've done a couple of applications using the SDK but it gets to be a pain trying to follow their documentation. This allows me to link the tables involved inside a database (sql, mdb, etc...) and then I can query the information I need. They also have a version that allows you to make changes to certain areas of the file through your vb application. It might make things easier for you.

Charlie
 
Charlie, I will check out that site today that sounds exactly what I am looking for, intuit documentation = crap, I finally did find the xml query for sales of the day so hopefully this will just work...but we all know how that goes.. tks for the info
 
Back
Top