Dim cmd as oledbcommand = new oledbcommand(“command as string”, connection_string)Dim Dr as oledbdatareader = cmd.executereader Dim I as integer=0While Dr.read()Dgv_name.item(col_index, i). Form created in VB2008 3 Textbox [Name(string), Company(string), Contact(number)] 3 Buttons [New Record, Update Record, Delete Record] 2. Load Fetch Data() End Sub Private Sub cmd New_Click(By Val sender As System.
Text) save Info = "UPDATE mediators List(mediator Name, email, mediator Primary Phone, mediator Secondary Phone, last Mediation Date, availability) VALUES('" & Mediator Name Text Box.
For this reason it is safer to just generally stick to db Open Dynaset.
To add a new record a recordset has to be be available.
When you Open Recordset on a local table, it uses db Open Table by default. Seek instead of Find First), but it cannot be used with attached tables.
Consequently if you later, as good practice, split your database the tables become attached tables and the code is likely to fail.