DataGrid

lothos12345

Well-known member
Joined
May 2, 2002
Messages
294
Location
Texas
How do I fill the DataGrid with what is in the dataset at runtime, if the dataset, oledbDataAdapter and OleDbDataConnection where all created at runtime as well using no wizards. Any help given is greatly appreiciated.
 
Try
set up strSql As String = "SELECT * FROM tableName"
oleDbCommand = New OleDbCommand(strSql, dbCon)
oleDbDataAdapter = New oleDbDataAdapter(oleDbCommand)
oleDbDataAdapter.Fill(dataSet, "tableName")
datagrid.DataSource = dataSet.Tables("tableName")
datagrid.DataBind()

For the most part this should do it. HOpe this helps.

-lp
 
Back
Top