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 : Error Accessing QB Data from VB.Net 2005Search Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Error Accessing QB Data from VB.Net 2005 
 Author   Message 
  victorking 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-05-07 
 Profile
 Posted : 2008-05-17 19:25:49

I wrote an application in VB.Net 2005 to move data between SQL Server 2000 and Quick Books, When i run the application, the transfer stars and stops at about 25% of the process with the following error

 ERROR [00000] [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file.

Please, is tthere anything am doing wrong?????

Thnaks

Victor

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-19 16:15:05

Your VB.NET application needs to use a STA (single-threaded-apartment) threading model. Multi-threading actually slows QODBC down as we need to re-establish a connection to QuickBooks every time the Thread ID changes. A Thread ID change could let a user open QuickBooks resulting in the type of error you are seeing.

Try looking at: QODBC Extremely slow when running from .NET 2.0 Thread or Console. and Intermitent [QODBC] QB Begin Session Failed. Error = 8004041c 

 

  Top 
  victorking 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-05-07 
 Profile
 Posted : 2008-05-30 01:07:03

 

Please, the error still comes up after using STA in my VB application. Pls what are my doing wrong???

Below is my application segment

Namespace My

' The following events are availble for MyApplication:

Partial Friend Class MyApplication

<STAThread()> _

Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup

'Application.Run()

End Sub

End Class

End Namespace

Please, what should i do???

ERROR [00000] [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file.

ERROR [00000] [QODBC] QB Begin Session Failed. Error = 8004041c, An internal QuickBooks error occurred while trying to access the QuickBooks company data file.

Thanks,

Victor

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-30 07:45:03
Sorry, at the start of this thread you say it works and then stops 25% through the process. The code segment provided doesn't show any connection properties, so it isn't really useful. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to