Reply |
| alice johnson replied to Arvind M at 05-Jul-08 03:20 |
Hi see this part of the code: Try using this example
Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click Dim
strConn As String = "data source=xx.xx.xxx.xxx; User ID=xxxxxx;
Password=xxxxxx; Persist Security Info=True;packet size=4096" Dim
cmd As New SqlCommand("INSERT INTO Customers (FirstName,
LastName)VALUES('" & txtFirstName.Text & "','" &
txtLastName.Text & "')", New SqlConnection(strConn)) cmd.Connection.Open() cmd.ExecuteNonQuery() cmd.Connection.Close() LoadData() End Sub |
|