Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make cursor read/write ?
Message
From
04/01/2001 04:34:48
 
 
To
03/01/2001 03:46:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00458184
Message ID:
00459249
Views:
19
Dear Cetin,

>2) Actually answer is hidden in your question :) Select into a table.
>It's not true that a cursor is kept in memory and table is written to disk. >Both are written to disk (even if the cursor just have 1 record with 1 logical >field). A cursor is volatile because as you close it VFP does the cleanup for >you and that's the difference. If cleanup is not a much concern for you than >use a table.

As you said, the differentiate of the cursor to table is VFP will does the cleanup, but i try to open the cursor(which also store into disk as .DBF and found that the data still appear. Why ?


>Another difference, in normal circumstances you might think of cursors as >tables belonging to a session only. Think of this, in 2 private datasessions >you select into cursor 'myCursor'. The 2 myCursor are different because their >actual tablenames on disk are generated uniquely (that's what dbf('myCursor') >returns). One session cannot access the data in other session unless session >is changed or actual name is provided.
>Actual disk files being generated uniquely means that if you'd use table then >you should also generate a unique name (lcTable=sys(2015)+'.tmp' for example). >Otherwise in a multiuser app you'd get into trouble (or multipl data sessions).
>You could do so with a strategy like this :

>* Grid.init
>this.tag = sys(2015)
>select ... into table (this.Tag)
>index on ....
>this.RecordSource = (this.Tag)
>*Grid.destroy
>use in (this.tag)
>erase (this.tag+'.*') && Cleanup

What is "this.tag" ? is it the table name ?

regard,
kengwen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform