Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Exclamation Unanswered: SQL Behing DAO Update Statement

    dim db as database
    dim rs as recordset

    set db = dbengine.opendatabase("c:\db1.mdb")
    set rs = db.openrecordset("select * from table1 where field1= " & value)

    rs.edit
    rs.field(1) = "new data"
    rs.update

    From the above code I want to get SQL Statement executed
    while rs.update is issued.

    Is it possible!

    and how.

    Arun

  2. #2
    Join Date
    Jul 2003
    Posts
    38
    When I understood right, you want to execute something like a Action/Delete/Appen-Query? Here's the way:

    dim qdf as querydef
    dim db as database

    set qdf=db.createquerydef("QueryName","Drop table XY or something else")
    qdf.execute
    db.querydefs.delete "QueryName"

    thats it
    regards

  3. #3
    Join Date
    Aug 2003
    Posts
    2
    Mr.Sub Hogo

    Thank for your reply.

    But what I want to know know what kind of action is happening
    when I issue to following methods

    RECORDSET.EDIT
    RECORDSET.ADDNEW
    RECORDSET.UPDATE
    RECORDSET.DELETE

    If the action is any SQL Statement then I want to get that SQL.

    Waiting for your Reply?

    Thanking you again.


    Arun

  4. #4
    Join Date
    Jul 2003
    Posts
    38
    These are DAO statements, that are performed by SQL implicitely, so there isn't a 1:1 transfer from DAO to SQL.
    EDIT for example locks the record, what many SQL-actions also do. But there is definitely no SQL-statement that just locks a record.

    sorry about my misunderstanding in the first attempt, couldn't think about such a curious thing - normally people go the other direction

    best regards

Posting Permissions

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