Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unique file problem

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
We have unique problem - we have two forms with private data sessions
- form A creates a unique file name using sys(3) and sys(2015) - this name is used for an index file.

uniquefilename = SUBSTR(SYS(3), 4, 4) + SUBSTR(SYS(2015), 7, 4)

form b has creates a cursor in the load event and also has a grid.

when both forms are open and we attempt to close form A, we get a file in use error when trying to delete the uniquefilename - all files have been closed using close data all

this only happens in combination with these forms - other forms can be open and closed no problem

any ideas?

 
found the problem - form b was opening the file that form A was creating a tag for. form b was leaving file open so when form A tried to delete, could not. closed the file in form b and voila - works.
 
Why don't you use a cursor in both of forms?
Create it using an SQL command with READWRITE parameter (VFP7 and up), then index the resulting cursor.
In the event of data change, use UPDATES.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top