Strange behavior of ACTION clause

Strange behavior of ACTION clause

Postby Enrico Maria Giordano » Mon Oct 08, 2007 10:08 am

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  Expand view
#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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Mon Oct 08, 2007 12:03 pm

Enrico,

> the LDB file is not deleted

Whats the LDB file ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon Oct 08, 2007 3:40 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests

cron