Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kishore Kumar
  Where is Kishore Kumar?
 HYDERABAD
 India
 Kishore Kumar
 To: FD MS
  Where is FD MS?
 
 Japan
 FD MS
 Tags
Subject: RE: grid with sql
Thread ID: 248768 Message ID: 248771 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Wednesday, December 23, 2009 7:52:56 AM         
   


You can populate grid.RecordSource property with SQL statement and set RecordSourceType property to 4.

for example:
grid.RecordSource = "SELECT field1, field2, field3 FROM YourTable"
grid.RecordSourceType = 4


If you would like to pass parameters then SQL should be formed along with the values.

"SELECT field1, field2, field3 FROM YourTable WHERE field1 = '&val1'"


> hello friends, i need your advice...
>
> what is the best policy for fill a grid with a sql statement?...
>
> In my form, i have 3 textbox, for use as parameter of my sql statement... but how i begin?...
>
> grid.recordsource = ??? overall on the initial load of my form...
>
>
>
> Fedor Morales

ENTIRE THREAD

grid with sql Posted by Fedor Daniel Morales Sueno @ 12/23/2009 6:34:26 AM
RE: grid with sql Posted by M. Akram Bhatti @ 12/23/2009 7:46:09 AM
RE: grid with sql Posted by Kishore Kumar @ 12/23/2009 7:52:56 AM