General information
Category:
Coding, syntax & commands
A stab in the dark. Is your cursor, cDl_dfltl, merely filtered versions of the underlying DBF, Deal , created with an SQL SELECT command? If so, the actual DBF is in use in the cursor work area, not a separate temporary table. You can easily tell by checking DBF('cDl_dfltl'). If it returns a full path to Deal.DBF instead of a temporary table, you will know that you are using a filtered version of the underlying DBF. If so, just add the NOFILTER keyword to your SQL SELECT statement to insure that a new temporary table is used for the cursor.
>The following code is blanking a good record in a dbf when it should be blanking a single record in a cursor. This is during a retrieve to reload the cursors with previously saved information.
>
> SELECT Dl_Dfltl
> LOCATE FOR d_code = cDeal.d_code
> IF FOUND()
> SCATTER MEMVAR
> SELECT cDl_Dfltl
> GATHER MEMVAR
> ELSE
> SELECT cDl_Dfltl
> GO TOP
> WAIT WINDOW "Saved Copy of Lease Template Not Found" TIMEOUT 3
> BLANK
> ENDIF
>
>Deal is an unrelated dbf in work area 13
>Dl_Dfltl is a dbf
>cDeal and cDl_dfltl are cursors that match the corresponding named dbf's.
>
>If the saved copy of lease template is not found, I want to blank the only record in cDl_dfltl. There is only one record in it, but this code Blanks the current record in the Deal dbf. I have tried a Scatter Memvar Blank and then a Gather Memvar, but it doesn't work. If I comment out the "BLANK" command, the Deal record is not blanked, but the cDl_dfltl record is not touched either.
>
>BTW: I put the Go Top in there because sometimes, I do a Replace on the cursors without it and nothing is updated. Go Top insures that I am sitting on the single record in that cursor.
>
>I hope someone can help me with this. Thanks...Tim
Previous
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