Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Sql Select Cursor to be use in Select
Thread ID: 209515 Message ID: 209578 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Monday, December 29, 2008 5:47:04 PM         
   


> Q1. How can i use a cursor under a particualar Select e.g.
>
> Select 4
>
> Select * From Astock2 into cursor Tc_As
>
> I want that Select area 4 Assign to Tc_As How can i do this?

I would say this is quite a bad idea.
Handling cursor by workarea numbers went out of fashion some 20 years ago.
Why? Because it's uninformative and accident-prone.
I'd recommend that to you review all your code to convert SELECT workarea number to SELECT alias.
The only workareanumbers you need is 0, as in
USE table IN 0 && open in first unused area. 
USE IN SELECT(cAlias) && close if exists 

-Anders

ENTIRE THREAD

Sql Select Cursor to be use in Select Posted by Khurram Tahir @ 12/29/2008 11:10:24 AM
RE: Sql Select Cursor to be use in Select Posted by Stefan Wuebbe @ 12/29/2008 11:38:07 AM
RE: Sql Select Cursor to be use in Select Posted by Anders Altberg @ 12/29/2008 5:47:04 PM