Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE dbf from EXE file
Message
From
10/08/2016 14:19:48
 
 
To
09/08/2016 16:55:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01639246
Message ID:
01639325
Views:
75
>>Yes, it could be it. I have this USE and then LOCATE command right after. I thought that the window/prompt I see was generated by the USE command. But it could be that it was generated by the LOCATE command. Thank you!
>>
>>But now I am wondering. I already changed my code to use CREATE CURSOR and then APPEND FROM ("MyTable"). Is this better than USE directly?
>
>Directly is always faster than going around, but it depends on what you want. A table from inside the exe is read-only; created cursor is readwrite and you may also have a somewhat different set of fields in it (append will make sure it goes by field name and will even do some simpler conversions where field types differ), so if a readwrite cursor is what you need, go for it.
>
>Of course, it won't change your table-in-exe, but you knew that.

And in the case where you're using an embedded copy as a "template" for a cursor, one thing you could do is embed the DBF file but use a different extension (e.g. DDD), and use FILETOSTR() then STROTOFILE() to create the writable copy (with the destination having DBF extension). The reason why I'm suggesting embedded DBFs having non-standard extension is to avoid situation where you could be opening the embedded DBF when you meant to be opening an external one (i.e. when you open any file, VFP tends to open anything that's internal within the current module -- even if you explicitly specify a folder). Of course, the alternative is to name the file so that it's clear that it's a template rather than the actual file to use.
Previous
Reply
Map
View

Click here to load this message in the networking platform