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 : QODBC connection using Visual Studio 2008Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Installation Support Forum

 New Topic 
 
 Post Reply 
[1]  
 QODBC connection using Visual Studio 2008 
 Author   Message 
  cmassey 
  
 Group: Members 
 Posts: 1 
 Joined: 2008-01-08 
 Profile
 Posted : 2008-01-08 02:38:36

I am trying to use QODBC connection using Visual Studio 2008.

The 2.1 Compatibility is unchecked.

Test Connection works fine.  Server Explorer Data Connections works fine.

When I go to Add New Data Source...

Database [NEXT]

Select ODBC.QODBC connection [NEXT]

I get this Error....

An error occured while retrieving the information from the database:

Selecting objects of type 'Procedure' is not supported.

 

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-01-08 13:36:06
You should still be able to connect to the 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 
  pPlayer 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-06-28 
 Profile
 Posted : 2008-06-28 11:30:50

My installation produces the same results.

I attempt to add a new Data Source [Database / ODBC..QODBC / New Connection / Data source: Microsoft ODBC Data Source / Use user or system data source name: QuickBooks Data / Test Connection -> Test connection succeeded. / OK / Next > / Next > / Retrieving Database information. / An error occurred while retrieving the information form the database: Selecting objects of type 'Procedure' is not supported.

__________________________________

I then attempt to run the suggested "minimal code required", above.

Dim cnQODBC As System.Data.Odbc.OdbcConnection

cnQODBC.Open()

It fails with this exception: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

__________________________________

The code from the QODBDemo vb project (I downloaded and built in VS 2008) also fails.

This line (131) of QODBCDemo.vb fails (Private msodbcConnection As Microsoft.Data.Odbc.OdbcConnection):

msodbcConnection = New OdbcConnection()

Below is the exception:

Unable to find an entry point named 'InterlockedIncrement' in DLL 'kernel32.dll'.

The source is: Microsoft.Data.Odbc

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-06-28 11:45:35

This is actually a Visual Studio 2008 bug, you will need to install VS2008 SP1.

See: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=340176

 

  Top 
  pPlayer 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-06-28 
 Profile
 Posted : 2008-06-30 22:40:39
I believe VS2008 sp1 is still Beta. I hope my QODBC 30 trial will still have some time left when Microsoft releases the final version. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-01 10:47:40
You can still use an expired QODBC evaluation with any of the QuickBooks Sample Company files. It just won't open real company files. 

  Top 
  pPlayer 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-06-28 
 Profile
 Posted : 2008-08-06 01:57:42

I just installed Visual Studio 2008 sp1 beta and I still get:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

The VB Demo still works, though.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-08-06 09:42:55
Please contact Microsoft support regarding the Visual Studio sp1 beta. 

  Top 
  pPlayer 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-06-28 
 Profile
 Posted : 2008-08-13 04:11:05

SOLUTION (found without MIcrosoft support, thank you): Specify x86 as Target CPU in Visual Studio 2008.

Change project properties | Advanced Compile Options... | Target CPU | x86

When this was done, the sample code (below) worked.

- Paul

Private msodbcConnection As Microsoft.Data.Odbc.OdbcConnection

Private Sub btnGetData_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGetData.Click

Dim myConnectionString As String

 

 

myConnectionString = "DSN=" & Trim(txtDSNSelect.Text)

Try

 

If (msodbcConnection Is Nothing) Then

msodbcConnection = New OdbcConnection()

End If

 

If (msodbcConnection.ConnectionString <> myConnectionString) Then

msodbcConnection.Close()

msodbcConnection.ConnectionString = myConnectionString

msodbcConnection.Open()

End If

Catch

MsgBox("Invalid DSN Name: " & Err.Description)

txtDSNSelect.Focus()

Exit Sub

 

End Try

Try

Dim msodbcEmployeeDA As New OdbcDataAdapter("SELECT * FROM Employee", msodbcConnection)

Dim msodbcEmployeeDS As New DataSet()

msodbcEmployeeDA.Fill(msodbcEmployeeDS, "Employee")

dgQODBCTable.DataSource = msodbcEmployeeDS

dgQODBCTable.DataMember = "Employee"

 

 

 

Catch

MsgBox("Invalid Grid Stuff" & Err.Description)

End Try

 

End Sub

 

  Top 
  pPlayer 
  
 Group: Members 
 Posts: 5 
 Joined: 2008-06-28 
 Profile
 Posted : 2008-08-13 06:54:44

I tried to open an Access database on my dev machine and got this message (which I Googled):
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
This led me to: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125207&SiteID=1

The explanation there was: "There is not a 64 bit version of jet that is why you get that error.  To force your app to use the 32 bit change the target cpu to x86 in the advanced compiler options."

 

So, I cann't honestly say I did not use Microsoft Support. I pray at the alter of Google.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-08-13 08:21:40
Our praise and thanks to the Google Gods!  

  Top 
  dougbr 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-08-29 
 Profile
 Posted : 2008-09-19 05:59:21
I'm trying to find out if the  automatic Data Source creation works in VS 2008 i.e. one won't get the error:

An error occured while retrieving the information from the database:

Selecting objects of type 'Procedure' is not supported.

Thanks

Doug

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-09-22 08:40:10
See: Visual Studio 2008 (with Vista) fast in forms app but slow in web app (website)  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to