>>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
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