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 : VB 2005 Express Edition And QODBCSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v7 Forum

 New Topic 
 
 Post Reply 
[1]  
 VB 2005 Express Edition And QODBC 
 Author   Message 
  RickyF 
  
 Group: Members 
 Posts: 5 
 Joined: 2007-03-28 
 Profile
 Posted : 2007-03-29 00:39:53

I am a newbie to QODBC 7.00.00.207

I am using Visual Basic 2005 Express Edition.

I am trying to set up a simple VB app to see the customer data from QB Pro 2006. I tried to follow the online tutorial but it is for VB 6 and the Data Form Wizard no longer exists.

When I try to add a new data source I see Database, Web Service and Object. None of these things have a QODBC or QB entry. Additonally, sample code seems to be for VB6 as well.

I tried adding a new reference again wth no success.

I am able to run the VB demo successfully but that only adds to the frustration I am having in getting started.

I would geatly appreciate if someone would provide a recipe for setting up my application so it can see the QB database.

Thanks.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-29 08:50:45
Try using the dataset designer and add a tableadapter, it will create the table and add it to the datasources for your project. 

  Top 
  RickyF 
  
 Group: Members 
 Posts: 5 
 Joined: 2007-03-28 
 Profile
 Posted : 2007-03-29 20:07:18

I tried what you suggest but I run into the same problem that has bedeviled me for several days.

I add a TableAdapter. The The TableAdapter Configuration Wizard appears. I select the New Connection button.

The Add Connection window asks for a Data source. (The default is a Microsoft SQL Server Database File (SqlCLient). If I try to change it I get two choices, Microsoft Access Database File or Microsoft SQL Server Database File. The Data Provider drop down list shows only .NET Framework Data Provider For SQL Server. If browse to the QuickBooks file and test the connection it fails.

No where do I see a QuickBooks database object to connect to.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-30 08:55:15

While SQL Server Express is the normal way of doing database storage in a Visaul Basic Express application, you have serveral alternatives available within Visual Basic Express. OLE DB (it stands for Object Linking and Embedding Database) is Microsoft's way of providing a generic database standard.

In the case of QODBC, the "QuickBooks Data" System DSN is called through the Microsoft OLE DB Privider for ODBC Drivers - MSDASQL.DLL. The differences become apparent when writing code. Whereas SQL databases are accessed through the System.Data.SqlClient set of classes, QODBC tables are processed using the system.Data.OleDB classes. 

From server explorer or from the data menu if you select "add Connection" you should get a dialog box to appear with the first textbox being: "Data Source".  If you click the "change" button you should get a list of all installed datasources and providers...if your list only shows Access and SQL then that is all that is recognized as installed on your machine.

You can get the latest MDAC from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=6C050FE3-C795-4B7D-B037-185D0506396C&displaylang=en

While Visual Basic Express does not provide design time support for ODBC connection in the data source wizard. You can still connect to ODBC data source using the OdbcConnection class (http://msdn2.microsoft.com/en-us/library/system.data.odbc.odbcconnection.aspx).

The following code is the minimal code required to create a DataSet from the SQL statement and attaches the dataset to a DataGrid:

Dim cnQODBC As System.Data.Odbc.OdbcConnection
Dim daQODBC As System.Data.Odbc.OdbcDataAdapter
Dim dsQODBC As System.Data.DataSet

cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=QuickBooks Data")
cnQODBC.Open()
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT ListID, FullName, CompanyName FROM Customer", cnQODBC)
dsQODBC = New System.Data.DataSet

daQODBC.Fill(dsQODBC)
dgDataGrid.DataSource = dsQODBC
dgDataGrid.DataBind() 'May or maynot be required depending on where you put this code.

 

  Top 
  RickyF 
  
 Group: Members 
 Posts: 5 
 Joined: 2007-03-28 
 Profile
 Posted : 2007-03-30 09:48:25

Thank you for your reply. I will try your suggestions tomorrow.

Independently, I had guessed earlier today that it might be my VB version that was the problem. I therefore experimented.

I created an XP virtual machine, updated XP. Installed QuickBooks. Updated QuickBooks. Installed QOBDC trial version. Installed a trial version of Visual Studio 2005 Professional I had sitting around. Updated it. (This all took about 4 hours.)

Then I tried a quick and simple VB test and voila the ODBC connection and QODBC were working just as I originally hoped.

I found a web site I have used before that offered a relatively inexpensive copy of Visual Studio 2005 Professional and I ordered it today.

So today the brick wall that is this project gave a little, my wallet is a bit lighter and my head is just a little more banged up.

Thanks again.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-03-30 10:01:24
If you wish to get full IDE support for QODBC - then, yes, you will need to purchase a full copy of Visual Basic or Visual Studio 2005. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to