I am working on a project to create a front end in vb 2010 for an access database. It is adding the records in vb but not saving them in the database; this is the code i have so far:

Inline Code Example HerePublic Class Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    AuthorsTblTableAdapter1.Insert(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text)
    Form1.Enabled = True
End Sub
Where am i going wrong?

Recommended Answers

All 4 Replies

Thanks, i will try it later on.

ok, got this to work, but now i'm stuck on delete.

Dim cmd As New OleDbCommand
cmd.Connection = connection
cmd.CommandType = CommandType.Text
cmd.CommandText = "DELETE FROM Table WHERE ColumnName =" & String & ""
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.