Friday, August 20, 2010

Visual Basic Help Please-Urgent?

How to show a record set generated from a sql statement in DataGrid Control..say adoRecordSet how to get this record set in to datagrid?Visual Basic Help Please-Urgent?
In COMPONENTS check mark the following and place them on your form:


Microsoft ADO Data Control 6.0 (SP4) (OLEDB)


Microsoft DataGrid Control 6.0 (SP5) (OLEDB)





Private Sub Form_Load()


Adodc1.ConnectionString = ';Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.mdb';


Adodc1.RecordSource = ';SELECT * FROM Table1';


Adodc1.Refresh


Set DataGrid1.DataSource = Adodc1


End SubVisual Basic Help Please-Urgent?
Hai Poojitha,


Place an adodc control on the form and provide the connection string in it and in that control there will be option to give sql query, give it. Specify the data source of datagrid control to Adodc and data field to member retrieved from query.





Bye Alex
set the Datasource property of that grid
set grid.datasource = recordset
  • love myspace
  • myspace girl
  • No comments:

    Post a Comment