Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Israel
    Posts
    2

    Unhappy Unanswered: Connect to my database on a server...

    I have Access database on the server and I want to connect to the base with VB 6.0 application.
    Please, help me to begin...
    How can I do it?

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251

    Thumbs up use ADO DB

    it's very very simple..... in the sample I use Read-only access, you can change it of course.

    for ALL connection strings incl. MS JET (used for Access MDB) go to http://www.able-consulting.com/tech.htm



    Dim myRecSet As New ADODB.Recordset

    strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\MyDatabase.mdb"

    myRecSet.Open "tblMyTable", strConnString, adOpenStatic, adLockReadOnly

    With myRecSet
    .... do whatever you want
    End With

    myRecSet.Close
    Set myRecSet = Nothing


    jiri

Posting Permissions

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