Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    suggestion to use correct connection (2000)

    ... to leran
    Wath is the difference and why i must use one connection instead other....
    Use a DNS connection similar:

    Option Explicit
    Public strFind As String
    Public dbconn As New ADODB.Connection
    Sub main()
    dbconn.Open "Provider=MSDASQL.1;Data Source=Maindata"
    frmSplash.Show
    End Sub

    or

    Set DB1 = DBEngine.OpenDatabase("GCD01F4500DATIPUBBLICAANTIR ICANAGRAFICA.MDB")
    Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")
    Set RSD2 = DB1.OpenRecordset("APP")

    wath is the better method and in wich case i can use one of this?
    Tks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: suggestion to use correct connection (2000)

    The first code fragment uses ADO (ActiveX Data Objects), while the second uses DAO (Data Access Objects). Both ADO and DAO are methods for connecting to databases. Both work well, so you can use the one you prefer. But I would recommend not to mix the two in one project - either use ADO throughout, or DAO.

Posting Permissions

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