Subject: ADO questions please help...
Posted By: cpopham Post Date: 12/7/2003 3:28:09 PM
Okay, I am trying to connect to a Paradox table with Access 2002 and would like to use ADO to do it, but I am not to familiar with ADO and can not find many sources of very useful information on ADO.  First of all the folder that I am using is: P:\ForACC and the folder and file that I am trying to connect to is: P:\Fleet\Fleet.db  and another table I need to connect to is:  P:\Fleet\lert.db.  Can someone show me some sample code for connecting and copying records from these two tables?  The records I need are from the Fleet table: VIN, Agency, Year, and lert and from the lert they are: Index and lert.  These two tables are on a Novel Network.  Is it possible for me to create a user with access rights to all of the above folders and then have the ado connection use the username and password to gain access to the tables and records that I need brought in?  Thanks for the help...
Reply By: DBoulos Reply Date: 1/3/2004 5:40:09 PM
First of all you must establish a reference to the ADO library to access any of its functions or methods etc...
From the VBE window, you go to tools => references, from there, you will find a drop down box with a myriad of libraries to choose from.
The ADO library that you probably want is ;
"Microsoft ActiveX Data Objects 2.7 Library".
You must always first establish a connection. eg;
Dim remoteConnection As New ADODB.Connection
 With remoteConnection
      .Provider = "Microsoft.Access.OLEDB.10.0"
       .Properties("Data Provider").Value = "Microsoft.Jet.OLEDB.4.0"
       .Properties("Data Source").Value = eg; "C:\My Documents\MyAccess.mdb" (path of your Fleet Table)
        .Open
End With
 remoteConnection.Close

This should get you started.
(Finding the path was a little tricky for me on my Application).
There are more methods required to access certain files & manipulate them,
This code will merely establish a connection.
Good Luck!


Go to topic 8074

Return to index page 976
Return to index page 975
Return to index page 974
Return to index page 973
Return to index page 972
Return to index page 971
Return to index page 970
Return to index page 969
Return to index page 968
Return to index page 967