Help! Error with From clause

lovencare

New member
Joined
Sep 21, 2008
Messages
1
Programming Experience
Beginner
here's my code:


*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
*deletebtn_click 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
"Syntax error in FROM clause."
i'd checked high n low for the possibilities of from clause error but no luck.

Help!
 
Back
Top