Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPD25 SELECT CURSOR w/o WHERE is a USE AGAIN
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00593094
Message ID:
00594252
Views:
34
Hi Nick

Thanks for the suggesstion but I'll stick with WHERE .T. as it gives me my results and plus if you will notice I just wanted a couple of fields and as I converted to a read-write cursor I got all the fields. WHERE .T. tackled it.

>There is a very effective way to force FP DOS (or any other version) to create a new cursor instead of filtering the table even with no NOFILTER clause. Add a calculated field to your SELECT.
>
>i.e
>
>SELECT *, space(1) as dummy FROM mytable INTO CURSOR mycursor
>
>
>
>>Actually I wanted to make this cursor read-write and when I ran the code I ended up with a query with all the fields of the original DBF and it was irritating.
>>
>>So I though posting here will clear me beliefs
>>
>>Thanks for responding
>>
>>>Yup this is correct.
>>>
>>>It is a FoxPro buffering thing,
>>>On single Table query that is fully optimizable, it will create a Filter of the original table. Which is ok if you only want to view the data, but it you want to modify it, or use it in a subsequent query you need to do the WHERE .T. which prevents it from being fully optimizable, but does not turn off rushmore, so query no slower.
>>>
>>>
>>>>Please note the following SELECT
>>>>
>>>>	SELECT mitem.subhead, mitem.uniqueid ;
>>>>		FROM a09mitem mitem ;
>>>>		INTO CURSOR abc
>>>>
>>>>
>>>>This is the DISPLAY STATUS after the SELECT is run
>>>>
>>>>Select area:  1, Database in Use: C:\VSO2\SW\A09\CMP00001\A09MITEM.DBF    Alias:
>>>> A09MITEM
>>>>           Code page:   0
>>>> Structural CDX file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.CDX
>>>>           Index tag:   UNIQUEID   Collate: Machine   Key: UNIQUEID
>>>>           Memo file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.FPT
>>>>       Lock(s): Exclusive USE
>>>>
>>>>Currently Selected Database:
>>>>Select area:  2, Database in Use: C:\VSO2\SW\A09\CMP00001\A09MITEM.DBF     (Read
>>>>only) Alias: ABC
>>>>           Code page:   0
>>>> Structural CDX file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.CDX
>>>>           Index tag:   UNIQUEID   Collate: Machine   Key: UNIQUEID
>>>>           Memo file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.FPT
>>>>       Lock(s): Exclusive USE
>>>>
>>>>
>>>>The CURSOR abc is my original file reused shouldn't it be a temp file???
>>>>
>>>>
>>>>Now notice this SELECT
>>>>
>>>>	SELECT mitem.subhead, mitem.uniqueid ;
>>>>		FROM a09mitem mitem ;
>>>>		WHERE .T. ;
>>>>		INTO CURSOR abc
>>>>
>>>>
>>>>This is the DISPLAY STATUS after the SELECT is run
>>>>
>>>>Select area:  1, Database in Use: C:\VSO2\SW\A09\CMP00001\A09MITEM.DBF    Alias:
>>>> A09MITEM
>>>>           Code page:   0
>>>> Structural CDX file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.CDX
>>>>           Index tag:   UNIQUEID   Collate: Machine   Key: UNIQUEID
>>>>           Memo file:   C:\VSO2\SW\A09\CMP00001\A09MITEM.FPT
>>>>       Lock(s): Exclusive USE
>>>>
>>>>Currently Selected Database:
>>>>Select area:  3, Database in Use: C:\TRASHCAN\81557496.TMP     (Readonly) Alias:
>>>> ABC
>>>>           Code page:   0
>>>>       Lock(s): Exclusive USE
>>>>
>>>>
>>>>What say!!!
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform