ADO & Access 97
Jeg har dl'et en eksempel-fil fra nettet af. Den er åbenbart lavet i Access 97. Med det medfølgende VB-eksempel kan jeg sagtens connecte til db'en. Men nu vil jeg så gerne ændre lidt i db'en. Så skal jeg så konvertere den. Men nu kan jeg så ikke connecte til den mere ??Koden der bruges i VB til at connecte med er :
Dim strConnect As String
'This is your connection string. It will contain
'information about the provider and the path to
'the database.
Dim strProvider As String
'In order to keep from typing long strings, I am
'breaking the connection string into smaller parts.
'It should be easier to read this way.
Dim strDataSource As String
'See note for strProvider.
Dim strDataBaseName As String
strProvider = "Provider= Microsoft.Jet.OLEDB.3.51;"
strDataSource = App.Path
'The data source becomes the directory that the
'program is executing in.
strDataBaseName = "\ADOTutorial1.mdb;"
'The name of the database.
strDataSource = "Data Source=" & strDataSource & _
strDataBaseName
'Append on the name of the database.
strConnect = strProvider & strDataSource
'The connection string is now made.
Set connConnection = New ADODB.Connection
'Preparing the connection object.
