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 : Data Source name not found and no default driver specifiedSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Data Source name not found and no default driver specified 
 Author   Message 
  Shanewaj 
  
 Group: Members 
 Posts: 22 
 Joined: 2007-09-24 
 Profile
 Posted : 2008-03-17 12:46:10

Hi

I am tring to connect to quickbook from c# windows application.

it is working in the development machine but when i try to install the same thing is the server

it gives me this error. VB demo is running fine, PHP Web app is running fine. only this one gives me this error

I am trying to do a simple search thats all. query = "select * from item"

I have tried all the possible connection string as

"DRIVER={QODBC Driver for QuickBooks};SERVER=QODBC;DFQ=.;OLE DB Services=-2;OptimizerOn=No;";

and "DNS=QuickBooks Data"

but nothing happening . seems like it is able to open the odbc connection and then when i am tring to fill a datatable then it gives this error

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

 

 
Md Shanewaj Rahman
Software Developer
Nulab Professional Imaging Pty. Ltd. 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-17 13:11:57
You can 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 
  Shanewaj 
  
 Group: Members 
 Posts: 22 
 Joined: 2007-09-24 
 Profile
 Posted : 2008-03-17 13:21:07

Sorry Still Gives the same error.

It is working in one machine but on the other machine it is not working

i have checked the access rules and almost every thing i knew. but no clue.

:(

 

 

 
Md Shanewaj Rahman
Software Developer
Nulab Professional Imaging Pty. Ltd. 
 
  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-03-17 13:24:44
Most likely QODBC needs to installed using the user login account being used by the application. If it's the sever, it needs to be installed on the server console as a local session and C# application will need to run as a local session also. 

  Top 
  Shanewaj 
  
 Group: Members 
 Posts: 22 
 Joined: 2007-09-24 
 Profile
 Posted : 2008-03-17 13:50:23
i have installed both from the same user name did not work any other idea. 

 
Md Shanewaj Rahman
Software Developer
Nulab Professional Imaging Pty. Ltd. 
 
  Top 
  Shanewaj 
  
 Group: Members 
 Posts: 22 
 Joined: 2007-09-24 
 Profile
 Posted : 2008-03-17 14:04:48

Thanks its all working now.

 

 
Md Shanewaj Rahman
Software Developer
Nulab Professional Imaging Pty. Ltd. 
 
  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to