Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening an Access Table via ADO Code
Message
De
07/07/2002 08:25:49
 
 
À
06/07/2002 23:34:42
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00675922
Message ID:
00675935
Vues:
17
Here is sample code for opening Categories table from sample NorthWind database. You must change only connection string (to use App.Path) and table name (to Phone_Sys_Type_Data):
Dim cnDatabaseConnection As New ADODB.Connection
Dim datPrimaryRS As New ADODB.Recordset

  cnDatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB;Persist Security Info=False"
  cnDatabaseConnection.Open
  datPrimaryRS.Open "Categories", cnDatabaseConnection, adOpenStatic, adLockOptimistic

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform