|
-
Aug 15th, 2001, 12:44 PM
#1
Thread Starter
Member
Some ADO Help please
I am trying to access a file on an AS400 using ODBC. I was trying to use DAO but someone showed me some code on using ADO. When I put the code into effect it crash and said:
User Defined type not Defined.
on the statement:
Dim objConn as New ADODB.Connection
Do I need to add a dll or something to use ADO in VB5?
Josey Wales : "You a bounty hunter?"
Bounty Hunter : "A man's got to do something for a living these days."
Josey Wales : "Dying ain't much of a living, boy."
-
Aug 15th, 2001, 12:48 PM
#2
Hyperactive Member
Have you added a reference to Microsoft ActiveX Data Objects 2.5 Library?
-
Aug 15th, 2001, 12:55 PM
#3
Thread Starter
Member
I don't have the reference to Microsoft ActiveX Data Objects 2.5, just 2.0 and 2.1. Where can I get that reference, can I download it?
Josey Wales : "You a bounty hunter?"
Bounty Hunter : "A man's got to do something for a living these days."
Josey Wales : "Dying ain't much of a living, boy."
-
Aug 15th, 2001, 12:59 PM
#4
Hyperactive Member
Version 2.5 is pretty common, but 2.6 is out now. You can install this from a file called mdac_typ.exe, and if you have a service pack for Visual Studio, then you'll probably find it there.
Go to here and search for mdac. This will give you links for either 2.52 or 2.61.
-
Aug 15th, 2001, 01:33 PM
#5
Thread Starter
Member
Ok that took care of that problem but now I'm getting an error:
Provider cannot be found.
on this line of code:
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;DSN="EPA"
What does this mean?
Josey Wales : "You a bounty hunter?"
Bounty Hunter : "A man's got to do something for a living these days."
Josey Wales : "Dying ain't much of a living, boy."
-
Aug 15th, 2001, 01:48 PM
#6
Hyperactive Member
If you downloaded ver 2.6 of the MDAC it does not include the latest Jet stuff. MS in their ultimate wisdom took the Jet stuff out of MDAC after ver 2.5. Go back to the MS Data site and get the Jet 4.0 download...
http://www.microsoft.com/data/
-
Aug 15th, 2001, 02:28 PM
#7
Thread Starter
Member
As seems to be the case always in programming you fix one problem and another shows its ugly face. Now that the provider error is gone I'm now getting:
Could not find Installable ISAM.
what does it mean?
Josey Wales : "You a bounty hunter?"
Bounty Hunter : "A man's got to do something for a living these days."
Josey Wales : "Dying ain't much of a living, boy."
-
Aug 15th, 2001, 03:07 PM
#8
Hyperactive Member
First of all your line
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;DSN="EPA"
Has two things wrong...
1. The quotes are wrong remove the one before EPA.
2. You are trying to use a connection string with provider and DSN at same time you only need one or the other...
VB Code:
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb"
or
The DSN knows the rest of the info needed.
-
Aug 15th, 2001, 03:40 PM
#9
Thread Starter
Member
Thanks All that helped I was really in a Bind.
Josey Wales : "You a bounty hunter?"
Bounty Hunter : "A man's got to do something for a living these days."
Josey Wales : "Dying ain't much of a living, boy."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|