0

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.Show()
    Form1.Enabled = True
    Form1.AuthorsTblTableAdapter.Update(Form1.BooksDataSet.authorsTbl)
    Me.Close()
End Sub
`
Where am i going wrong?
2
Contributors
4
Replies
19
Views
3 Years
Discussion Span
Last Post by oussama_1
0
Dim cmd As New OleDbCommand
cmd.Connection = connection
cmd.CommandType = CommandType.Text
cmd.CommandText = "DELETE FROM Table WHERE ColumnName =" & String & ""
connection.Open()
cmd.ExecuteNonQuery()
connection.Close()
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.