Results 1 to 3 of 3

Thread: From ADO to DAO

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,934

    From ADO to DAO

    I need to trasform this ADO code for DAO, i spossible?
    tks.

    Code:
    ...
    Set objCommand = New ADODB.Command
        With objCommand
            .ActiveConnection = CONN
            .CommandText = "AGG_ALBERO1"
            .CommandType = adCmdStoredProc
            .Prepared = True
            .Execute , , adExecuteNoRecords
            Set objCommand = Nothing
        End With
    ...

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: From ADO to DAO

    Try next
    Code:
    Dim Rs as Recordset
          ' Open your desired database here.
          Set MyDB = DBEngine.Workspaces(0).OpenDatabase(...
          Set Rs = MyDB.OpenRecordset("AGG_ALBERO1", dbOpenSnapshot, dbSQLPassThrough)
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,934

    Re: From ADO to DAO

    Quote Originally Posted by jggtz View Post
    Try next
    Code:
    Dim Rs as Recordset
          ' Open your desired database here.
          Set MyDB = DBEngine.Workspaces(0).OpenDatabase(...
          Set Rs = MyDB.OpenRecordset("AGG_ALBERO1", dbOpenSnapshot, dbSQLPassThrough)
    nice!!! tkx.

    i'm new with DAO...
    but this tips really spoeed up the query exceution directlly the Query in Acces databse? or exists other way?

    note:
    I want to migrate the project to ADO but i need to change, perpah a milion of lines, and i not have time for tath:-)

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