Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filling a grid with output from SQL
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Filling a grid with output from SQL
Miscellaneous
Thread ID:
00326283
Message ID:
00326283
Views:
62
Yesterday's lesson was great. I have the SQL statement written and it is pulling the proper records from the table into a cursor.

I have a form with a text box (for the user to enter the search text), a grid, and a cmdbutton that runs the show.

The user enters the search text, presses the button and I use this:
l_cSearchtext='%'+upper(alltrim(ThisForm.txtSearchString.value))+'%'

select * from document where title like l_cSearchtext order by number into cursor temp1
to pull the appropriate records into the cursor temp1.

Now I want the cursor data to be placed in the grid. The grid has its ColumnCount set to -1, the RecordSource to temp1 and the RecordSourceType to 4 - SQL Statement.

After the SQL statement, I refresh the form, but get nothing in the grid....what (OBVIOUS THING) am I missing here?

TIA!
Phil Thomas
http://phillipdthomas.com

Never let your energy or enthusiasm be dampened by the discouragements that must inevitably come.....
Next
Reply
Map
View

Click here to load this message in the networking platform