Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataEnvironment.Cursor.Database - how set?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01352072
Message ID:
01352152
Views:
23
Jim,

You're welcome -- and nice to hear it's now working.

Another thought I just had, based on your new results -- check the active *path* when you run the form. I'll submit that the folder containing the database on the Y drive probably precedes the folder containing the database on the local drive in the path sequence, and that's why you're opening the network database first by default. When the Y drive was taken away, the path now can't locate that database and searches further -- finding your local one instead.


>Evan,
>
>Thanks for your suggestions. You gave me an idea that seems to have worked:
>
>When I look at the properties of the cursors in the form's Data Environment in the Development Environment, for each cursor, the database property shows the full path to the test database on the network, using a mapped drive letter, e.g. Y:\....\dbname.dbc
>
>So, I unmapped Y; in Windows Explorer, then started VFP and ran the form. It ran fine. When I exited it and opened it with the form designer, and looked at the cursors in the Data Environment, they now all point to the database on my local computer.
>
>Hmmm
>
>Again, thanks for your response.
>
>Jim
>
>>Jim,
>>
>>You may have already tried this, but the first thing that comes to mind is -- does your form use a private data session? If not, then the test database on the network server might have been opened (and is still open and selected) prior to your running the test on your form. You might try restarting VFP to get a fresh environment and/or issuing a CLOSE DATABASES command, then attempting to run your form again.
>>
>>If the "simple fix" didn't help -- try opening the database you desire FIRST, then running the form and checking the Database property to see if it's pointing at the right place. Again, you may have already tried this approach, but those are the first two things I'd try.
>>
>>Lastly, set your form to use a private data session, run it that way and see if you get the same behavior.
>>
>>None of these may FIX the issue -- but at least you should be able to see what's affecting the form, and we can go forward from there.
>>
>>
>>
>>>I was just testing one of my forms in the VFP development environment, and I got an error from DataEnvironment.OpenTables. "File access is denied...etc." The path to the database in the error message pointed to a test database on the network server, instead of the test database on my own computer.
>>>
>>>I have been designing & editing this form for months. Always, I test it against the database on my own computer. Only when I am ready to release it do I test it against the network test database.
>>>
>>>Yesterday, this was working using the database on my own computer. Today, it is attempting to use the test database on the network. When I look into the data environment for the form, the Database property of each cursor is set to the network database.
>>>
>>>The development environment Tools...Options...File Locations...Default directory points to my local test database.
>>>
>>>Online help says this is a read-only property at design time.
>>>
>>>How did this happen, and how do I reset it back to my local computer.
>>>
>>>Thanks for your help.
>>>Jim
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform