Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question Unanswered: A few simple DAO questions (I use ADO normally)

    1. Which operations other than specifically .MoveNext is causing the cursor/focus in the recordset to move to the next record? (For example, in ADO, using debug.print rsX.getstring will move to the next record after printing the current record to the immediate window.)

    2. While using dbDenyWrites, and one or more target records are already locked by other user(s), is it possible to wait x seconds and have a new try "automatically"? What error number is returned in that case?

    3. I have seen a code example which used both dbDenyWrites and dbLockOptimistic at the same time (do not know if it "worked"), which immediately does not make much sense to me. Is this possible? If so, which situations would it be relevant to specify both?

    4. Is there a difference using several recordsets with a single connection using DAO? Anything that I should be aware of in this respect?

    D.
    Win-XP pro, Access 2002, ADO 2.7, DAO 3.6. English versions of apps/OS.

  2. #2
    Join Date
    Jul 2004
    Posts
    125
    1. Besides .Movenext, there are the .Bookmark and the .Absoluteposition properties which one can use to navigate within a recordset.

    2. Retries can be set in the database Options Advanced dialog, or manipulated through VBA code.

    3. These two parameters conflict. The circumstances depend if it is an ODBC or a Jet recordset. Read up on Help relating to DAO recordsets.

    4. This question is not clear as to what type of connection you're talking about. With a linked Jet datatable you can use multiple nested recordsets without a problem.

    I hope that this helps.

  3. #3
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question

    Quote Originally Posted by ineuw
    1. Besides .Movenext, there are the .Bookmark and the .Absoluteposition properties which one can use to navigate within a recordset.

    2. Retries can be set in the database Options Advanced dialog, or manipulated through VBA code.

    3. These two parameters conflict. The circumstances depend if it is an ODBC or a Jet recordset. Read up on Help relating to DAO recordsets.

    4. This question is not clear as to what type of connection you're talking about. With a linked Jet datatable you can use multiple nested recordsets without a problem.

    I hope that this helps.
    OK, thanks.

    1. Navigation is not a problem. I want to know which operations actually causes the cursor to movenext, as I often want to do many operations on the same record, hence want the cursor to REMAIN on the same record. So I want to know when I must use a bookmark or moveprev to get back to the record I am dealing with in the code.

    2. Any code example on how this can be done in VBA?

    3. Yes, I figured it did not make sense.

    4. Firstly I will deal with linked MDB's, that is what I do now and this question is about initially. I will soon work on db's that will involve the Desktop version of MS-SQL and also MySQL. Any information about limitations with DAO are welcome. As I understand DAO is mainly targeted at Jet DB's?
    Mainly or only?

    Thanks for your answers.

    Daniel
    Win-XP pro, Access 2002, ADO 2.7, DAO 3.6. English versions of apps/OS.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    4. don't worry about it!
    DAO works perfectly well with SQL-Server and with MySQL.

    some old renegades like me even try to justify not learning ADO by claiming that DAO works better than ADO with sql-aware servers (single buffer in DAO vs one per connection in ADO).


    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Jul 2004
    Posts
    125
    The bookmark property is what will keep you on the same record. I also agree with izyrider that DAO is just fine (just another renegade)

  6. #6
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Question

    Quote Originally Posted by ineuw
    The bookmark property is what will keep you on the same record. I also agree with izyrider that DAO is just fine (just another renegade)
    Yes, well, I know that much :-)

    Which operations causes the cursor to move after it finishes, such as the debug.print rs.getstring does in at least ADO?
    (the cursor moves to the next record after it prints the current. Quite annoying.) I need to know when I HAVE to use bookmarks. (to avoid coding bookmarks whenever I can).

    So basically, which functions/operations differ between ADO and DAO in this respect?

    Daniel
    Win-XP pro, Access 2002, ADO 2.7, DAO 3.6. English versions of apps/OS.

Posting Permissions

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