Results 1 to 5 of 5

Thread: help on DAO to ADO conversion

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    3

    help on DAO to ADO conversion

    this code below using a DAO connection library

    Data1.Refresh

    If Data1.Recordset.RecordCount > 0 Then

    Data1.Recordset.Edit

    Data1.Recordset("RYC") = rsData!COMM

    Data1.Recordset.Update
    End If

    i want this to convert to ADO conncection library, please any one advice me how to do it. i had try this query "con.execute Update table set field1 =field2 where field3>1" it works but i want to update only a single row not all the records contained in field3.

    please help tnx

    mnar0930

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: help on DAO to ADO conversion

    Query isn't working because you are not referencing the primary/unique key in the WHERE clause.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    3

    Re: help on DAO to ADO conversion

    there no unique id that can idetify the certain records, is theres a way on how to update it?

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: help on DAO to ADO conversion

    Consider database re-architecture as early as possible, make it a habit to provide primary keys for all records.

    Data Control has an ADO counterpart. Check the components list.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: help on DAO to ADO conversion

    I'd recommend looking at the ADO Tutorial link in my signature - it is an ADO code equivalent of the situation where you would use a data control, but as it is code you have full control of what happens, and can easily extend/limit it as you want.

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