Dim
myCon
As
New
OleDbConnection
Dim
ds
As
New
DataSet
Dim
mycmd
As
New
OleDbCommand
Dim
myada
As
New
OleDbDataAdapter
myCon.ConnectionString = ConfigurationManager.ConnectionStrings(
"wb2012ConnectionString"
).ToString()
myCon.Open()
Dim
dsql
As
String
=
"delete from wbInventory where wb_cInvCode='"
+ DataGridView1.CurrentRow.Cells(2).Value.ToString() +
"'"
scmd.ExecuteNonQuery()
myada.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
myCon.Close()