PLease help!!!!!
How the ... do i fill my dataset with data using sql server, datatable, and adapter...
I've passed the select statement [ Select * from [TableName] and a ref of my datagrid to this procedure.
Public Sub FillDataGrid(ByRef DataGrid As DataGrid, ByVal SelectCommand As String)
Try
Dim adSQLAdapter As New SqlDataAdapter(SelectCommand, mSQLConnection)
Dim commands As New SqlCommandBuilder(adSQLAdapter)
Dim dtTable As New DataTable()
'POPULATE THE DATATABLE WITH DATA.
adSQLAdapter.Fill(dtTable)
DataGrid.DataSource = dtTable
Catch ex As Exception
CreateErrLog(ex.ToString)
End Try
End Sub