Board index » Visual Studio » DataAdapter Update
|
orozcoc
|
DataAdapter Update
Visual Studio193
Hi, I have a function to fill the data into the dataset: Private Sub LoadSystemDataDB(ByVal m_str As String, ByVal da As _ OleDbDataAdapter, ByVal tbName As String) Dim OleDbConn As New OleDbConnection(OLEDB_CONNECTION_1) OleDbConn.Open() da = New OleDbDataAdapter(m_str, OleDbConn) Dim cmd As New OleDbCommandBuilder(da) da.Fill(dsDataSet, tbName) dsDataSet.CaseSensitive = True OleDbConn.Close() End Sub However when i try to update the data using: Dim autogen As New OleDbCommandBuilder(daLoginDetails) daDataAdapter.Update(dsDataSet, "myTable") I get error when i try to update it. The error is on the Update line where it saids "The DataAdapter.SelectCommand property needs to be initialized". So i guess i was doing something wrong when filling the data?? or what is the proper way to make a fill data function? as i have many tables to load into the dataset. Hope anyone can help? many thanks. - |
