Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: beware of sql cursor read/write trick
Thread ID: 5535 Message ID: 228890 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Friday, May 22, 2009 12:35:01 PM         
   


The developer of this site has taken a lot of pains to give us VFP formatting. You can use it by using < VFP > and < /VFP > tags or by selecting the code and using the 5th button in the toolbar.

LOL. Sorry couldn't resist that.

Regards
Tushar


> Hello,
>
> I think most of you know about the trick in VFP5/6 to read and write in a read only cursor:
>
> select yourfields from sometables where something = .T. into cursor readonlycursor
> select readonlycursor
> lcDbf = dbf()
> use (lcDbf) again alias newalias in 0
>
> -----
> now watch this:
>
> create table test (fielda C(2))
> for i = 1 to 10
> appe blan
> repl fielda with transf(i)
> endfor
> sele * from testtable into cursor testcursor
> sele testcursor
> ?alias() && as expected
> ?dbf() && as expected because VFP sets a filter on this simple query
> lcFile = dbf()
> use (lcFile) again alias cursorrw in 0
> sele cursorrw
> repl all fielda with "AA"
> ? 'contents of cursorrw'
> scan
> ? fielda
> endscan
> ? 'contents of testtable'
> sele testtable
> scan
> ? fielda
> endscan
>
> perhaps this is common knowledge, but I just thought I'd share this with you.
> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts

ENTIRE THREAD

beware of sql cursor read/write trick Posted by Eric den Doop @ 11/30/2001 8:46:00 PM
RE: beware of sql cursor read/write trick Posted by drCipher @ 11/30/2001 9:31:20 PM
RE: beware of sql cursor read/write trick Posted by Eric den Doop @ 11/30/2001 9:46:32 PM
RE: beware of sql cursor read/write trick Posted by Phisit Thaeochanthuek @ 5/22/2009 5:41:07 AM
RE: beware of sql cursor read/write trick Posted by Andy Kramek @ 5/22/2009 12:20:59 PM
RE: beware of sql cursor read/write trick Posted by Eric den Doop @ 5/22/2009 12:31:00 PM
RE: beware of sql cursor read/write trick Posted by tushar @ 5/22/2009 12:35:01 PM
RE: beware of sql cursor read/write trick Posted by Ammar Hadi @ 5/22/2009 4:41:25 PM
RE: beware of sql cursor read/write trick Posted by tushar @ 5/22/2009 6:29:46 PM