CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ADO

  1. #1
    Join Date
    Oct 2001
    Posts
    3

    ADO

    How can i connect to a access database using ADO?



  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: ADO


    Dim Cnn As ADODB.Connection

    'In the place where you want to establish your connection, such
    'as the Initialize event of a class module, enter the following:

    Dim sConn As String
    Set Cnn = New ADODB.Connection

    sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & DBNAME & _
    ";Persist Security Info=False"

    With Cnn
    .CursorLocation = adUseClient
    .Open strConnect
    End With



    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured