on 8/4/02 14:52, Carlo Sacchetti at csacchetti (at) libero .DOT it wrote:
> Hi Ruslan, > I use this movie with one DB that I open 3 times like I have 3 DB. > In this DB there's one BO named "Valentina" and one field named "Field1" > I use it but it have a problem and have a fatal error. > Than I reopen it and it work fine but it return wrong result. > If I search "pero" if return 0
Hi Carlo,
Man, but you have made mistakes in your test. If you do the same in your release project then no wonder you get errors.
1) I have told many many times, PLEASE use DebugLevel. So simply uncomment the next line in your test:
on startMovie global gDB -- ValentinaDebugLevel(2) ^^^^^^^^^^^^^^^^^^^^^
And you will start see errors returned by Valentina.
2) Now first mistake. You open THE SAME db 3 times !!!
on OpenDB global gDB set gDBIt = new(xtra"VDataBase") openDatabase(gDBIt, the moviePath & "prova.vdb", 4) set gDBFr = new(xtra"VDataBase") openDatabase(gDBFr, the moviePath & "prova.vdb", 4) set gDBEs = new(xtra"VDataBase") openDatabase(gDBEs, the moviePath & "prova.vdb", 4) set gDB = gDBIt end OpenDB
But this will not work!!! And in Msg window you will see error, because second time you cannot open the same db.
------------ 3) This is not important but small note: In close you try to close 4 dbs but you was going to open only 3
on StopMovie global gDB CloseDatabase( gDB ) set gDB = void CloseDatabase( gDBIt ) set gDBIt = void CloseDatabase( gDBEs ) set gDBEs = void CloseDatabase( gDBFr ) set gDBFr = void ValentinaShutDown end
More correct code is to close only dbIt, dbEs, dbFr.
-- Best regards, Ruslan Zasukhin [ I feel the need...the need for speed ] ------------------------------------------------------------- e-mail: ruslan@paradigmasoft.com web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on (at) lists .DOT macserve.net ------------------------------------------------------------- ©2002 Ruslan Zasukhin |