Delete Statement:
Create form:
Codes For delete Button:
Dim con As OleDbConnection
Dim com As OleDbCommand
con = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Program Files\new\Database.mdb;Jet OLEDB:Database Password=125122;")
com = New OleDbCommand("delete * from student where stid=@id", con)
con.Open()
com.Parameters.AddWithValue("@id", TextBox1.Text)
com.ExecuteNonQuery()
con.Close()
No comments:
Post a Comment