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: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
 Tags
Subject: RE: Select sql and grid
Thread ID: 104345 Message ID: 104539 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Grids
Date: Thursday, August 17, 2006 12:43:57 PM         
   


> i am setting the grid's recordsource to an empty string! like this, in this way is it correct ?
>
> THISFORMSET.Form11.Grid1.RecordSource = ""


No! This is what detroys the grid. Did you read my Blog? Did you understand it? Apparently NOT!

> and as you tell above what is the RecordsourceType setting among 4 options
> and if i want to populate a cursor in a grid


Why don't you try doing what you are told?

Please re- read what I said last time again and do exactly what I describe - forget the RecordSourceType -just leave it at 1 Alias:

> [1] Create the (empty) cursor in the form Load()
> [2] Bind the grid to the empty cursor
> [3] Run the query into a different temporary cursor (in Init, or Setup or whereever you need it)
> [4] Zap the grid cursor and append from the temporary cursor
> [5] Delete the temporary cursor

Then refresh your form and it will all work.

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

ENTIRE THREAD

Select sql and grid Posted by Khurram Tahir @ 8/15/2006 9:55:34 AM
RE: Select sql and grid Posted by Jojo Sabino @ 8/15/2006 10:03:40 AM
RE: Select sql and grid Posted by Khurram Tahir @ 8/15/2006 12:40:17 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/15/2006 12:41:46 PM
RE: Select sql and grid Posted by Khurram Tahir @ 8/15/2006 1:28:59 PM
RE: Select sql and grid Posted by tushar @ 8/15/2006 5:33:31 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/16/2006 12:34:53 PM
RE: Select sql and grid Posted by Khurram Tahir @ 8/16/2006 12:44:54 PM
RE: Select sql and grid Posted by tushar @ 8/16/2006 1:23:42 PM
RE: Select sql and grid Posted by Andy Kramek @ 8/17/2006 12:43:57 PM
RE: Select sql and grid Posted by Don Higgins @ 8/21/2006 6:25:33 PM