Q: FPW and closing a cursor leaves dbf open

Q: FPW and closing a cursor leaves dbf open

Post by sgi » Fri, 07 Jul 1995 04:00:00



The command:

        select field1 from table1 into cursor cur1

opens workarea A with alias TABLE1
           and B with alias CUR1

If you then USE CUR1 to close it, FPW closes the cursor but leaves the
dbf open.

In my innocence I would have expected the table to also be closed unless
it was also in use for another purpose (rather than me having to monitor
it myself).

I note that closing TABLE1 leaves the cursor open (but I have no complaints
about that!).

Does anybody have any thoughts about this? In particular, how does VFP
handle it?

thankx, anthony shipley

 
 
 

Q: FPW and closing a cursor leaves dbf open

Post by Alexandre Pechtchansk » Fri, 07 Jul 1995 04:00:00



>The command:

>    select field1 from table1 into cursor cur1

>opens workarea A with alias TABLE1
>           and B with alias CUR1

>If you then USE CUR1 to close it, FPW closes the cursor but leaves the
>dbf open.

>In my innocence I would have expected the table to also be closed unless
>it was also in use for another purpose (rather than me having to monitor
>it myself).

>I note that closing TABLE1 leaves the cursor open (but I have no
>complaints about that!).

Anthony:
This is not a bug, this is feature ;-)
No, seriously, that's how it supposed to work - you open and close your
dbfs explicitly (or let FoxPro to do it for you by selecting
"Save/Restore Environment" in screen builders, but this is not reliable).

Quote:>Does anybody have any thoughts about this? In particular, how does VFP
>handle it?

Dunno about VFP.
--



 
 
 

1. Closing cursors after leaving them open.

When I open but don't close a cursor in pl/sql code, and then I
try to open it again, I, of course, get cursor still open.

How do I tell Oracle through sqlplus to close that currently open
cursor?

I've tried:

sqlplus> close c1;

sqlplus> close cursor c1;

sqlplus> declare
sqlplus> cursor c1 as blah;
sqlplus> begin
sqlplus> close c1;
sqlplus> end;
sqlplus> /

sqlplus> begin
sqlplus> close c1;
sqlplus> end;
sqlplus> /

--
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.

2. Oracle JNDI can not find helper. ClassNotFoundException

3. 40088 No open cursor or cursor closed.

4. GA - ATLANTA - DBA WITH SALES SKILLS AND LARGE DATABASE EXPERIENCE - ORACLE

5. help-no open cursor or cursor closed

6. SQL Deployment question

7. No open cursor or cursor closed !!!

8. Modify information during BatcMove

9. CommitTrans Problem...(Error Msg:No open cursor or cursor closed)

10. Sybase/VB - 40088 No cursor open or cursor closed w/ stored procs

11. Leave recordset open, or close and reopen.

12. Closing a file left open by utl_file

13. Tables Left Open on Form Close