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.net QODBC connectionSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC Frequently Asked Questions

 New Topic 
 
 Post Reply 
[1]  
 VB.net QODBC connection 
 Author   Message 
  ramya 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-05-08 
 Profile
 Posted : 2007-05-08 03:42:47

Hi

i tried the same sample code as given in the forums to connect to QODBC from ASP.net.

Here is the code:

cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=RAMYA")

cnQODBC.Open()

daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT ListID, FullName, CompanyName FROM Customer", cnQODBC)

dsQODBC = New System.Data.DataSet

daQODBC.Fill(dsQODBC)

DataGrid1.DataSource = dsQODBC

DataGrid1.DataBind()

I am not able to connect to QODBC and i am getting the following error:

ERROR [00000] [QODBC] QB Begin Session Failed. Error = 80040416, If QuickBooks is not running, a call to the "BeginSession" method must include the name of the QuickBooks company data file. ERROR [00000] [QODBC] QB Begin Session Failed. Error = 80040416, If QuickBooks is not running, a call to the "BeginSession" method must include the name of the QuickBooks company data file.

QuickBooks is running in my machine but still it is giving this error. Please help me out in this aspect.

Thanks in advance.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-05-08 09:39:33
In the DSN RAMYA you must specify the path of your company file as per: How do I setup QODBC to auto-login into QuickBooks and start it if it's not running?  

  Top 
  ramya 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-05-08 
 Profile
 Posted : 2007-05-08 09:57:11

Hi

For this DSN,I have given the path of company file. I have followed the same steps shown below but still i m getting the same error. 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-05-08 11:20:26

QuickBooks must not be running to establish a connection. Check that VB Demo can establish a connection to your company file first without needing QuickBooks to be running.

Your ASP.NET application is running as a service, so you will also need to configure the QODBC DCOMs. See: How do I automatically setup the QODBC DCOM Servers? and How do I manually setup the QODBC DCOM Servers on Windows XP Pro and Windows 2003 Server? for more information.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to