Solved

data provider could not be initialized

Posted on 2010-09-17
10
1,341 Views
Last Modified: 2013-11-28
I've been having problems in Access 2003, which I use as front-end connection to a SQL 2005 server, with the following error message  - "Data provider could not be initialized". The message pops up every  few hours. I tried to catch it On Error events in all forms in my project, and sequentially suppress it.  This did not work, I mean, the error is not caught on this event.

I also tried to tune up SQL server settings connected to a new feature in SQL 2005 to poll, discover, and clean up disconnected sessions (http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/47d2df0a-0f32-41f8-a5b2-6d8d656d3271/ ). Although It seems that I receive now  fewer error messages, it did not solve the problem. Two other threads here were not helpful:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Forms/Q_23925257.html 
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Forms/Q_23256341.html
0
Comment
Question by:aryef
  • 4
  • 4
10 Comments
 
LVL 3

Expert Comment

by:alexfarias
ID: 33701056
0
 
LVL 3

Expert Comment

by:alexfarias
ID: 33701068
maybe is a MDAC issue...try to reinstall it
0
 
LVL 3

Expert Comment

by:alexfarias
ID: 33701078
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 3

Expert Comment

by:alexfarias
ID: 33701092
so I read the second answer, it seems that has to do with permissions ... try it too, check the permissions in the database
0
 

Author Comment

by:aryef
ID: 33701596
No,... the application works correctly all of the time, I have access to all db resources I need. The pop-up message suddenly pops up after a long inactivity period, usually more than one hour. So, it could not be any permission/security or MDAC issue. The user that access the MS SQL is granted  dbo permissions on the database.  It could not be also an  IIS issue, for I do not use it. I use direct  ADO connection to DB  im my VBA code.  Sample code is
Set conn = New ADODB.Connection
    conn.ConnectionString = "some valid connection string"
    conn.Open
    Set cmd = New ADODB.Command
With cmd
   .ActiveConnection = conn
   .CommandTimeout = 5
   .CommandText = strCommandText
   .CommandType = adCmdStoredProc
End With

Set rst = New ADODB.Recordset
    rst.Open cmd
If Not rst.State = adStateClosed Then
   If Not rst.EOF Then
 
    Retval = rst.GetString(adClipString, , DELIM, DELIM)
   End If
End If
0
 

Author Comment

by:aryef
ID: 33712153
Now I am trying to use "Launch Depends..." of Sysinternals Process Explorer, to try to find out where this message is thrown. As I said, it is not caught at "OnError" or "OnCurrent" event in any form in my project.
I'll post if I find something interesting there...
0
 

Author Comment

by:aryef
ID: 33765706
First of all, the error message is 100% reproducible by choosing the "refresh" item of the "records" menu of Access Menu bar. it has no apparent consequence, for after its appearing, the application works as fine as it should.
It was not possible to catch the message neither at OnError event of the Form not at OnCurrent.

OK, I tried to bind the main form of my project to just a regular Access table, instead of ADO recordset. As a result, the error message ("data provider coudl not  be initialized") was incurred as many times as it takes of refreshing the each and every subform of my main form!  Instead of appearing once, I had 13 uch appearances when choosing the "refresh".

So, I rebound the main form back to its ADO recordset. Now, I again receive the message only once, when I choose the "refresh" item of the "Records" menu.

If someone now what event fires up on clicking the "refresh" item of the "records" menu, this will probably solve this very strange problem..
??
0
 

Author Comment

by:aryef
ID: 33772938
I did the following experiment - I run the application within a VMware Player box. VMWare Player has a very interesting feature - when you restore it from a minimized state, or just click within, it does not incur any repaint or screen refresh events in MS Access applications. And, as a result, no "Data provider...." message ever appears after an inactivity period. Only if I specifically choose "Records" -> "Refresh" menu item, it happens, but it seems to be not a problem, becuae no one will need to do it on purpose.
Quite a strange "solution"... Doe anyone know how to mimic this behavior (skip all repaint events)  in regular, not virtualized, evnvironment??
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 34018091
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question