Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with cursor names in VFP 9
Message
From
11/10/2005 16:38:11
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01057970
Message ID:
01058080
Views:
13
I am seeing something similar. If I do something like:

1. TableA contains the records I select from.
2. TableB is a new empty cursor I create using a select statement.
3. TableC is a table I want to append records INTO from TableB

1. Select * from tableA into cursor Temp1 (this creates the file 00005IBT0008.tmp in my TMPfiles directory and the table Temp1 is in use.
2. Determine the filenane for the temporary cursor. (TableB)
3. Open a new empty table in an open workarea (TableC)
4. Attempt to append into TableC from TableB.

I receive the error message: "File is in use."
Since I created a cursor, not a table, if I close the cursor, then it no longer exists. It works if I create a table for TableB instead of a cursor and then delete the table when I am done and just step through tableB and write the records to TableC from either a table or the query results instead of using APPEND. That is what I typically do. I seldom use append unless the table physically exists on the harddisk and is a permanent table for the app or a file that is downloaded, etc.


>I am moving a VFP 6 app to VFP 9 and running into problems with cursors. This happens with both kinds of cursors, the kind created by SELECT INTO CURSOR as well as CREATE CURSOR. These cursors are being created in the C:\Documents and Settings\username\Local Settings\Temp folder and have names such as 00002m8900cz.tmp. This application frequently creates cursors and then appends to real tables with APPEND FROM (lcDBF), where lcDBF is the saved DBF() name of the cursor. APPEND FROM is not working correctly, I believe because it does not like filenames starting with numeric characters. What can I do to get around this?
>
>Not sure exactly when this broke -- could be VFP 7, 8, or 9.
>
>Thanks in advance!
>
>Mike
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform