here's my code:
*form load sub
*deletebtn_click sub
i tried to update the dataset after delete a row of data from the datagridview1 but wat i get in return is
Help!
*form load sub
VB.NET:
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MasterCashFlow.MDB")
Dim dad As New OleDbDataAdapter
Dim ds As New DataSet
Dim t As DataTable
Dim rc As Integer
Try
dad = New OleDbDataAdapter("select * from [EF & FC]", cn)
dad.Fill(ds, "EFandFC1")
t = ds.Tables(0)
DataGridView1.DataSource = t
'formload()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
end sub
VB.NET:
Dim cmd As New OleDbCommandBuilder(dad)
rc = DataGridView1.CurrentRow.Index
t.Rows(rc).Delete()
MsgBox("deleted successfully")
dad.Update(ds, "EFandFC1")
End Sub
i tried to update the dataset after delete a row of data from the datagridview1 but wat i get in return is
i'd checked high n low for the possibilities of from clause error but no luck."Syntax error in FROM clause."
Help!