Strange behavior of ACTION clause

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Strange behavior of ACTION clause

Post by Enrico Maria Giordano »

Try the following sample (you will need of an MDB file). Now remove the comment of the ACTION clause and you will notice that the LDB file is not deleted anymore. Why?

Code: Select all

#include "Fivewin.ch"


#define adOpenForwardOnly 0
#define adOpenKeyset      1
#define adOpenDynamic     2
#define adOpenStatic      3

#define adLockReadOnly        1
#define adLockPessimistic     2
#define adLockOptimistic      3
#define adLockBatchOptimistic 4

#define adUseNone   1
#define adUseServer 2
#define adUseClient 3


FUNCTION MAIN()

    LOCAL oRs := CREATEOBJECT( "ADODB.Recordset" )

    oRs:Open( "SELECT * FROM Clienti", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clienti.mdb", adOpenKeyset, adLockOptimistic )

    TEST( oRs )

    oRs:Close()

    oRs = NIL

    RETURN NIL


STATIC FUNCTION TEST( oRs )

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 1 BUTTON "";
//           ACTION oRs

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

> the LDB file is not deleted

Whats the LDB file ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

It is a file that Jet engine uses to handle multiuser locking. It should be automatically deleted when the database is closed.

EMG
Post Reply