Re: INTO TABLE vs INTO CURSOR READWRITE

Author: Steve Ellenoff

Posted: 2010-07-30 at 02:14:44

HMM... More testing reveals the following oddities:

You can ZAP a cursor created with READWRITE NOFILTER, but you CANNOT

issue a PACK.

That would be a significant difference from INTO TABLE if you need to

delete a bunch of records and then wish to pack the table.

@ Vince - I tried doing the USE (DBF("cursorname")) trick, but it

wouldn't work, since if I closed the cursor, the file was erased, and

if I left it open, it said it was already being used?

At 12:15 AM 07/30/2010, you wrote:

>Thanks Vince & Lew!

>

>I just found this line in the VFP helpfile:

>"NOFILTER creates a cursor that can be used in subsequent queries."

>

>So it would seem READWRITE NOFILTER is the proper equivalent to INTO TABLE..

>

>-Steve

>

>

>At 09:56 PM 07/29/2010, you wrote:

> >Steve Ellenoff wrote:

> > > Is there any difference between these two?

> > >

> > > I'm looking at some older code and I have remarks about the SELECT

> > > SQL using INTO TABLE to avoid some VFP errors that says something

> > > like, "Command cannot be issued on a cursor" or something to that effect.

> > >

> > > Would changing my code to CURSOR READWRITE work equally well as the

> > > INTO TABLE ?

> >

> >If you used tables to avoid "operation can not be performed on a

> >cursor," I would think you could do CURSOR READWRITE, followed by USE

> >DBF("MyCursor") ALIAS Bob, and do whatever on Bob. Just off the top of

> >my head.

> >

> >

> >

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/20100730061446.52FB324CB78@marge.leafe.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Steve Ellenoff