PDA

Click to See Complete Forum and Search --> : displaying data into a datagrid


Dave C.
Aug 5th, 1999, 10:23 PM
I need info from a SQL select to be displayed in a table format. The VB Datagrid control seems to be what I want, but I don't know how to use it. The data needs to come from a foxpro DBF, and I can connect to it, but can't get the info to display anywhere. Any Ideas?

JHausmann
Aug 6th, 1999, 11:53 AM
Create a data control.
select the appropriate "connect" property (i have 4 different Foxpro selections available)
Choose your database name property
Set the recordset value.
Set recordsource to the table name

on the dbgrid:

Set datamode to bound.
Set Datasource to the control you created.

If you've done everything right, and you've set the database name property (it can be done programattically, so I usually don't keep the property set), you can right-click on the grid and select "retrieve fields" from the popup menu.