• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Opening Databases > Specifying the Data Source

Specifying the Data Source

The Connection object has a property, ConnectionString, which you can use to inform ADO where to find the data source, as well as information about opening it. Here's a simple example:

Dim cnConnectToLedger As New ADODB.Connection
With cnConnectToLedger
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .ConnectionString = _
    "Data Source=C:\Documents and Settings\GL.mdb"
End With


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint