Hi all, I have a page where a user can click to add a new item to a list. The item is submitted to a SQL database. Submitting works, but for some reason, only one item exists in the database at a time.In other words, when I submit an item, it goes into the database, but only into the first row - anything there previously is deleted/overwritten. I can check the database and it is being submitted properly.Public Sub NewBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewUserBtn.ServerClick Dim MyConnection As SqlConnection = New SqlConnection("server=server;database=db;uid=uid;pwd=pwd") Dim MyCommand As SqlCommand = New SqlCommand("insert into certifications (name, empID) values (@name, @empID)", MyConnection) MyCommand.Parameters.Add("@name", newFName.Text & " " & newLName.Text) MyCommand.Parameters.Add("@empID", newEmpID.Text) Dim DA As SqlDataAdapter = New SqlDataAdapter DA.SelectCommand = MyCommand MyConnection.Open() Dim DS As DataSet = New DataSet DA.Fill(DS, "Titles") MyConnection.Close() Response.Redirect("WebForm1.aspx", True) End Sub
Any ideas as to why this happens?Also, it was suggested to me to use executenonquery() for single inserts like this - is that a good idea? Thanks.James