Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from cursor
Message
From
10/01/2003 01:04:19
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
09/01/2003 18:43:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00740117
Message ID:
00740176
Views:
19
>Since I started using cursors, I realized that it was necessary to use the dbf() function for commands like “append from”.
>
>However, it seems like is not always necessary, since I only add such function when getting an error when VFP does not find the required alias.
>
>I’d like to know under which circumstances it is neccdesary the use of dfb() function.
>
>I recently tested some code created and tested with VFP 7 SP1 on VFP 6 SP5, and at the time of executing append from dbf(“mycursor”) the oposite is happening. VFP can´t find the file returned by the dbf() funtion. The error message displays the path returned by the dbf() funtion.
>
>Are there any threads or online articles about this?

I believe you need to wrap with DBF() for those commands that expect the name of an on-disk file, as opposed to those that will work with the alias of an already open cursor/table.

As for DBF() sometimes not working - if you've created a cursor using a SELECT - SQL, in some cases VFP generates a "filtered view" rather than an actual disk file. So, although the cursor/alias exists, a disk file does not. You can force the creation of a disk file in VFP5 or later by adding the NOFILTER clause to your SELECT - SQL.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform