I have two text boxes that are bound to a dataset, there is also a Sqlconnection, SqlDataadapter in use. VB.Net generated the Insert, Update and Delete statements for the dataset but I cant figure out how to get the new data out of the textboxes and into the database. This is the code that was generated by Visual Studio. Thanks for the help.
SqlInsertCommand1
Me.SqlInsertCommand1.CommandText = "INSERT INTO dbo.Users(UserName, UserPassword) VALUES (@UserName, @UserPassword); " & _
"SELECT UserName, UserPassword FROM dbo.Users WHERE (UserName = @UserName)"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserName", System.Data.SqlDbType.VarChar, 20, "UserName"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserPassword", System.Data.SqlDbType.VarChar, 20, "UserPassword"))
SqlInsertCommand1
Me.SqlInsertCommand1.CommandText = "INSERT INTO dbo.Users(UserName, UserPassword) VALUES (@UserName, @UserPassword); " & _
"SELECT UserName, UserPassword FROM dbo.Users WHERE (UserName = @UserName)"
Me.SqlInsertCommand1.Connection = Me.SqlConnection1
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserName", System.Data.SqlDbType.VarChar, 20, "UserName"))
Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@UserPassword", System.Data.SqlDbType.VarChar, 20, "UserPassword"))