Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening an Access Table via ADO Code
Message
De
06/07/2002 23:34:42
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Opening an Access Table via ADO Code
Divers
Thread ID:
00675922
Message ID:
00675922
Vues:
57
Can anyone tell me the code to open a table in an Access database using code only? I am currently using a bound control with the Connection string as C:\database\database.mdb. The trouble with opening the db this way is when an end user installs the program to a directory other than c:\database.

Current code (that gives error... Object Variable or With block not set):

Dim sConnectionString As String
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Persist Security Info=False;" & _
"Data Source=" + App.Path + "\smdr1.mdb"

datPrimaryRS.ConnectionString = sConnectionString
datPrimaryRS.RecordSource = "Phone_Sys_Type_Data"


datPrimaryRS.Recordset.Open
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform