Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How 'to lose' the table? An example.
Message
From
16/02/1999 14:41:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
How 'to lose' the table? An example.
Miscellaneous
Thread ID:
00188088
Message ID:
00188088
Views:
63
Hi,All.

I bring one more demonstration example bug. In it the form loses number DataSession.
This example works in VFP3-6 with established SP.
Probably it will be interesting.

CLOSE database
SET safe off
CREATE table a (key c(3)) && To create the table
use
form1=createobject('form1')
DEFINE class form1 as form
DataSession=2 && PRIVATE
PROCEDURE init
USE a
=messagebox('Table A is open',64,'Begining of FOCUS')
_VFP.DOCMD('!rem') && The command RUN without DOCMD will work correctly
if sele('a')=0 && The table was gone?
=messagebox('Table A not found.Let's search',64,'FOCUS')
if set('datasession')#thisform.datasessionid
=messagebox('DATASESSION has changed!!! We try to restore.',64,'FOCUS')
ff=thisform.datasessionid && We remember necessary datasession
thisform.datasessionid=ff && It is logical, but does not work
thisform.datasessionid=1 && We begin at first
thisform.datasessionid=ff && Here now just right
if sele('a')#0
=messagebox('The table is found',64,'The end of focus')
sele a
use
delete file a.dbf
endif
endif
endif
ENDPROC
ENDDEFINE
Reply
Map
View

Click here to load this message in the networking platform