Solved

I can't get to work ADO with an Access 97 Database in a Windows 98

Posted on 2002-07-01
16
154 Views
Last Modified: 2010-05-02
In my Windows 2000 Server works just fine. The database and the program are installed in the Windows 98. I already tried installing MDAC_TYP.EXE (the last one) and creating ADO objects with CreateObject and I'm using SP5 in the compiler. Also tried installing Access.
The error raises when I try to open the connection:
"Provider cannot be found"
ConnectionString: cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" & _
        "Persist Security Info=False;Data Source=" & _
        "base.mdb"

Instructions to make ODBC entries and code to use them are accepted as an answer.
0
Comment
Question by:ricarditopicaron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +3
16 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7122677
The last MDAC has ADO 3.6 not 3.51.
Try updating Jet engine also since there is a matter with 3.6
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7122688
Provider=Microsoft.Jet.OLEDB.3.51 refers to the DAO engine.

Provider=Microsoft.Jet.OLEDB.4.0 refers to the ADO engnie.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7122700
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7122709
replace "Provider=Microsoft.Jet.OLEDB.3.51;" with "Provider=Microsoft.Jet.OLEDB.4.0;"
0
 

Author Comment

by:ricarditopicaron
ID: 7123496
Jet 4.0 doesn't work in server (3.51 does)
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 7123514
you need to install Jet 4.0. you can download it from http://www.microsoft.com/data/download.htm#Jet4SP3info
0
 

Author Comment

by:ricarditopicaron
ID: 7123542
Jet SPack does not work either, also ole db SPack doesn't too
(After the provider error I get an oledb error)
0
 
LVL 4

Expert Comment

by:AlonHirsch
ID: 7123980
As of MDAC 2.5, the JET stack is no longer installed as part of the MDAC installation.
In order to access a JET database (Access), you need the JET stack.
JET can be installed by installing an older version of MDAC - try MDAC 2.12 GA, then 2.5 SP1.
Once these have bene installed, try JET40SP3 and see if that helps.

These must all be installed on the target PC.

I've developed several projects that use JET and ADO, and I've always installed ALL the versions of MDAC and then JET40SP3 and have had no problems.

HTH,
Alon
0
 

Expert Comment

by:nisha080597
ID: 7124106
Hi
why not create a ODBC name and try to connect like this
Go to control panel,Double click ODBC(System DSN)
Add  (Select Microsoft Access Driver(*.mdb)
Press [Finish]
Data Source Name=Base
Description=Connection to Base Database

press select(where your database/location)
example:- [c:\test\base.mdb]
Odbc creation is completed

below code for connection
first you have to add a refrence
project->references->Microsoft ActiveX Data Objects 2.5 Library (tick the check box and press Ok)
Create a comand button or call form_load
dataconnection

public sub dataconnection()
dim cstring as string
dim sql as string
dim oconn as ADODB.connection
dim adors as ADODB.Recordset

On Error GoTo Errconnect
cstring = "Data Source=base;User Id=;Password=;"
Set oconn = New ADODB.Connection
oconn.Open sconnection


Set adors = New ADODB.Recordset
adors.CursorType = adOpenKeyset
adors.LockType = adLockBatchOptimistic

sql="Select * from(Table name)"
adors.Open sql, oconn, , , adCmdText

end sub()

have a try please
H
0
 

Expert Comment

by:nisha080597
ID: 7124123
Hi
forgot to add
Please add this line of code before end sub
exit sub
Errconnect:
msgbox "Error" & err.number & err.description

try this
H




0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7124235
You surely do something wrong. It is suppose to work since a long time. Have a look at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q271908.

Also, you can use the Component checker to check the state of your installation: http://www.microsoft.com/data/download.htm#CCinfo


>>(After the provider error I get an oledb error)
Which error?
0
 

Author Comment

by:ricarditopicaron
ID: 7124448
I tried SP3 also but didn't work (emoreau)
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7124497
Can re-state what is working and where (you are talking about 98 and 2000)?
0
 

Author Comment

by:ricarditopicaron
ID: 7124610
I installed every MDAC_TYP i found here:
http://www.microsoft.com/data/download.htm#Jet4SP3info  and didn't work (AlonHirsch )
0
 

Author Comment

by:ricarditopicaron
ID: 7124768
Don't try any more!!!!! I solved it!!!!!
It is someone from here!!!
Wait a few hours and I'll tell you (I've got to know)
0
 

Author Comment

by:ricarditopicaron
ID: 7125329
I was prooving with "SELECT Name FROM Subjects WHERE Pass=Null" this works only in Jet 3.51, I realized that in Jet 4.0 I have to write it like this "SELECT Name FROM Subjects WHERE Pass IS NULL". But after Jet 4.0 what really did it work was the Jet xxx SP3
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2005 text editor 10 54
vbModal 12 73
how to loop through and process two columns in excel 8 71
VBA: copy range dynamically based on config sheet v3 6 53
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 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