Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening an Access Table via ADO Code
Message
From
08/07/2002 11:21:42
 
 
To
08/07/2002 10:50:38
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00675922
Message ID:
00676145
Views:
22
Yours first sentence was:
Can anyone tell me the code to open a table in an Access database using code only?...

OK, you can put connection string into the ADODC control's ConnectionString property (assuming adodc1 is ADODC control):
adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB;Persist Security Info=False"
adodc1.Refresh
This code assumes also that all data bound controls are bound to ADODC control at design-time and you set all other necessary properties of ADODC control also at design-time.

Again, you must change connection string to your own path to database and use in it App.Path.

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?...

Previous
Reply
Map
View

Click here to load this message in the networking platform