Link to home
Start Free TrialLog in
Avatar of DMaddox
DMaddox

asked on

ADO Could Not Find Specified Provider

I have an application that I have distributed that uses the ADO data control to propulate a DataGrid to provide a list of choices from a database. I have a user that is using Windows NT. Everything works fine until they try to display the datagrid. Then they get the message "ado could not find specified provider". The program runs fine on Windows 98 systems, but this is the only NT that I have installed on. Any suggestions as to what the problem could be. The program uses DOA for all database
operations other than this procedure to supply a list of choices.

The drivers being used are MSADODC.OCX and MDAC_TYP.EXE

Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

What driver are you using?  IOW, which Access driver.

That driver is probably not installed on the NT system.  You'll need to ensure that it is available in your installation package.
Avatar of wsh2
wsh2

On your development machine.. there is a file named MDAC_TYP.EXE.. these are the Microsoft Data Access Components. Copy this file to the NT machine and run it.. and your program should run ok.

In the future, use the Packaging and Deployment wizard to include MDAC_TYP.EXE in your distribution package.. and then run the SETUP created there, to install the application on another machine.

One other cause of the problem.. could be that you are using a DSN that is not defined on the NT machine.
Avatar of DMaddox

ASKER

The driver that has been installed is the MSADODC.OCX driver. I have checked and this is installed on the other system.
Avatar of DMaddox

ASKER

Edited text of question.
MDAC_TYP.EXE is the Microsoft Data Access Compenents Installation file. These components are required for ADO / DAO to work. The most stable version of MDAC (as of this writing) is v2.1. Right Mouse click on your MDAC_TYP.EXE and.. click on Properties.. and check the version that you are using.

Once you are assured that it is at least v2.1.. copy it to the NT Machine and then RUN the MDAC_TYP.EXE file on it to install the Microsoft Data Access Components.  
Which version of the Jet.OLEDB provider are you using. If using 3.51, change it to 4.0.
Avatar of DMaddox

ASKER

wsh2: I had run the MDAC_TYP.EXE and all of the components have been installed, but the message is still showing.

Note: I reformatted a drive, re-installed Windows 95, and then ran the installation program, running the MDAC_Type.exe. I am still getting the same error message.

Do you have any other suggestions? Other dll's that can be added?
A couple of things:

1. What type of DB are you accessing? If it is Access, which versions of Access are installed on the Client machines (ie. 97/2000). The Access/2000 DB format is incompatable with 97.. and if in installing Access/2000 the user chose to convert their DBs, then you will have a problem. Please see emoreau's Provider comment above for ADO.. With the DAO references in your program you should be using v3.60 rather than v3.51.

2. Please provide the version of Visual Basic (including Service Pack Level) and MDAC that you are running. If you are not at least Service Pack Level 3 and MDAC v2.1.. download them, upgrade your development machine and recreate a FULL (Dependency Files included) PDW setup package. Unless all of your machines are Internet Explorer v5.0+, I strongly suggest that you go VB Service Pack 3 (which includes MDAC v2.1). Here are the hyperlinks:

VB Service Packs:

http://msdn.microsoft.com/vstudio/sp/vs6sp4/default.asp

(Service Pack 3 is listed in a frame on the right hand side of the web page )

MDAC:

http://www.microsoft.com/data/download.htm

Important Note: Go to your ..\VB\PDWizard\Redist directory and right mouse click on the MDAC_TYP.EXE file there.. hit Properties and check the Version of MDAC_TYP.EXE that is being included
whenever you PDW package. The MDAC version should agree with your programming intentions (ie.. if you are Service Pack Level 3.. the MDAC_TYP.EXE should be v2.1). If it isn't, copy the appropriate MDAC_TYP.EXE into the directory.

3. On the Win/95 machine that you regenerated, did you install DCOM BEFORE running your MDAC/Application setup? DCOM is a prerequisite for MDAC and on Win/95 machines (ONLY) DCOM is NOT installed by default. (A copy of the DCOM installable is on your Visual Basic installation disk.. do a Find File for DCOM98.EXE (<-- most current Win/95 compatable version) -or- DCOM95.EXE.

4. As you are mixing Access methodologies (ADO and DAO), did you properly cast all your Data Types? For Databases, Connections, Commands, Recordsets, your Dims should be prefixed with the access methodology you are using. EG.

Dim MyDAORecordset As DAO.Recordset
Dim MyADORecordset As ADODB.Recordset

5. If the ADO Data Control that you are using was first placed in the application BEFORE a Service Pack upgrade was done, try Deleting the ADO Data Control from the project.. and then Adding it back again. This will refresh the GUID references to the MDAC version you are currently using.

6. In installing on the NT machine, have you allowed for proper permissions to access the data?

Avatar of DMaddox

ASKER

reply to whs2

Thanks for your efforts. I am using VB6 with SP3, and the MDAD_TYP.exe is version 2.1. I have checked each item on your list, and to no avail. I am using the ADODC1 data control and Microsoft Jet OLEDB 3.51.
 On my development computer, it works fine. Only when I install on another computer do I get the error. I have considered changing to a grid that will use a DAO control. Does VB6 have such a grid?
Avatar of DMaddox

ASKER

I am also using an Access 97 database to store the data.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DMaddox

ASKER

Comment accepted as answer
Avatar of DMaddox

ASKER

You were right about changing the version to 4.0. I still have a problem though when I assign the ADO to the data control. The recordset shows that it has returned records, but when I use the following statement, the datagrid displays empty. Any suggestions? I'm using the Microsoft DataGrid 6.0 SP3.

Set DataGrid.DataSource=Adodc1.Recordset
DataGrid.Refresh
From MSDN:
---------------------------------------
PRB: DataGrid or DbGrid May Not Display Data

Last reviewed: December 17, 1998
Article ID: Q193094
The information in this article applies to:

Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 5.0, 6.0 on the following platform: x86

SYMPTOMS
In Visual Basic 6.0, after binding a DataGrid control to an ActiveX Data Objects (ADO) data control, you may not see any data display in the grid. This behavior occurs if you set or change any property of the Layout Property page of the DataGrid without executing the Retrieve Fields option of the DataGrid first.

You may see the same behavior occur in Visual Basic 5.0 if you use a DBGrid control.

CAUSE
The data fields are not retrieved yet.

RESOLUTION
The Layout Property page for either the DataGrid or the DBGrid controls contains properties available at design-time only and needs to be set after all fields are available or retrieved.

To work around this problem, you need to run the Retrieve Fields method before setting any property on the Layout property page.

STATUS
This behavior is by design.

MORE INFORMATION
The following sample project uses a DataGrid control and a SQL Server database and also applies to the DBGrid.

Steps to Reproduce Behavior

Create a Standard EXE project in Visual Basic. Form1 is created by default.

Add two components to the project, a Microsoft ADO Data Control 6.0 (OLEDB) and Microsoft DataGrid Control 6.0 (OLEDB).

Place both components on the default form and use their default names (ADODC1 and DataGrid1).

Right-click on the ADO data control and click on ADODC properties. On the General property page, use either ODBC Data Source Name or Connection String to connect to Pubs database. Set the RecordSource property page to use adCmdTable and Authors table. You may need to fill the Authentication property page with the proper UserName and Password.

Click on the DataGrid control and set the DataSource property to ADODC1.

Run the project and make sure that you see data in the grid.

Stop the project, right-click on the datagrid, click on Properties (or Custom property), and click on Layout tab. Set any property on the page (Locked, for example) and click OK.

Run the project again and observe that no data appears in the grid while the vertical scroll bar of the grid shows that it has some data.

Stop the project, right-click the datagrid control, click on the Retrieve Fields menu option, and then click on the "Yes" button in the message box.

The datagrid will be set back to the default Layout properties, so you need to reset any Layout Property changed in step 7.

Run the project and note that the grid filled again with data.

Avatar of DMaddox

ASKER

Is there a way to use the data grid setting the database and using a query during runtime? I don't retreive the fields during design time, only at run time. Under jet 3.?, it works fine doing this, but jet 4.0 doesn't seem to work right.