adding records to an access db

  • Thread starter Thread starter Scott M.
  • Start date Start date
S

Scott M.

Dim con As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data
Source=<database path here>")
Dim cmd As New OleDb.OleDbCommand("INSERT statement here", con)

Try
con.open
cmd.ExecuteNonQuery
Catch ex As OleDbException
'error handling here
Finally
con.close
End Try
 
I have an unbound form with two fields,
Date and Name.
I want to enter text in theese two fields and then click a button
to add the text in a row in an Access db.
What is the easiest way to do this?
reidarT
 
Back
Top