1
Answer

insert records into Access DB

saphiroth42

saphiroth42

19y
1.7k
1
Hi, Im trying to insert a record into acess but im not sure whats wrong. conn.Open() 'Opens connection to DB sqlCommand = "Select * from MainInfo" AdapterGauge = New OleDbDataAdapter(sqlCommand, conn) ' fill dataset AdapterGauge.Fill(ds, "TableGauge") tempTable = ds.Tables("TableGauge") Dim dtNewRow As DataRow = tempTable.NewRow dtNewRow("Work Order #") = TextBox1.Text tempTable.Rows.Add(dtNewRow) AdapterGauge.Update(tempTable) Thank you

Answers (1)