General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Persistent, occasional error loading a view
Hi Y'all,
About once a week someone gets an error opening a form and it seems to be when loading one of the views. I just tell them to try again and it pretty well always loads. But they would like this fixed. Here is the error:
"Error loading file - record number 16. PARTFILE .Loading form or the data environment : Database object is being used by someone else"
Happens on a few forms so not specific to one. I load my views via the data environment with usually "NoDataOnLoad" set to .T. so I get something like this for error code something like this:
SELECT Plaintif.firstname, Plaintif.lastname, Plaintif.birthdate,
Plaintif.gender FROM plaintif WHERE 1=0 ORDER BY Plaintif.lastname,
Plaintif.firstname into cursor Viewcalv16
Couple of questions:
1) is the above solvable or is using the data environment just not robust enough on a network
2) if it's not good enough, has anyone developed a routine that would allow me to use the data environment for development but then it auto-switches to code to open the view? I was thinking that it might be possible to do something like this:
a) pull the views into the DE
b) set AutoOpenTables to .f. in the DE
c) put the code in the Load method to open the form again as read-only and scan for the view records and fire them from there
Albert
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only