Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Rob Vleeschhouwer
  Where is Rob Vleeschhouwer?
 Leeuwarden
 Netherlands
 Rob Vleeschhouwer
 Tags
Subject: RE: select readonly.
Thread ID: 143288 Message ID: 143290 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Monday, August 27, 2007 2:28:00 PM         
   


> How can I achieve that a select * where...... into cusor mycursor is NOT readonly.

Since VFP 8 (maybe Version 7 I am not sure) there has been a READWRITE clause in VFP so to make any result writable you just add it to the SQL Query

SELECT [fields] FROM [tables] INTO CURSOR [name] READWRITE

Note that this automatically forces VFP to create a physical table for the cursor in the TEMP directory (you cannot get a filtered view when you add the READWRITE clause so you don't need the NOFILTER option)

In earlier versions the only way to do the same thing is to use this trick:

SELECT [fields] FROM [tables] INTO CURSOR intermediate_results
USE DBF( 'intermediate_results' ) AGAIN IN 0 ALIAS final_result
SELECT final_results
USE IN intermediate_results


Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

select readonly. Posted by Rob @ 8/27/2007 1:59:30 PM
RE: select readonly. Posted by tushar @ 8/27/2007 2:05:23 PM
RE: select readonly. Posted by Andy Kramek @ 8/27/2007 2:28:00 PM
RE: select readonly. Posted by Rob @ 8/30/2007 10:54:33 AM
RE: select readonly. Posted by Andy Kramek @ 8/30/2007 1:11:36 PM
RE: select readonly. Posted by Rob @ 9/3/2007 6:50:41 PM
RE: select readonly. Posted by Andy Kramek @ 9/3/2007 10:58:37 PM
RE: select readonly. Posted by Rob @ 9/4/2007 12:50:36 AM
RE: select readonly. Posted by Ken Murphy @ 9/4/2007 1:26:26 AM