i tried passing the parameter pdata which needs to b a varchar from a textbox and get the error :
Method not found: 'Void System.Data.SqlClient.SqlParameterCollection.Rollback(System.String)'.
heres my code :
Protected Sub changeNum_Click(sender As Object, e As EventArgs) Handles changeNum.Click
Dim retValue As Integer
Dim connection As SqlConnection
connection = New SqlConnection("Data Source=151-rsS\SQLEXPRESS;Initial Catalog=easyDb;Integrated Security=SSPI; ")
Dim Command = New SqlCommand("UPDATE mytable Set pdata = @value1", connection)
Command.Parameters.AddwithValue("@value1", htgtextbox.Text)
connection.Open()
retValue = Command.ExecuteNonQuery()
connection.Close()
End Sub
SqlConnection & SqlCommandwhich will not work for the version you are targeting... You are using SqlExpress and you can't use the one's I mention above... You need to look atsqlcecommandandsqlceconnection... Theceis for Compact EditionSystem.Data.SqlServerCeto use it... Also I have answered similar question stackoverflow.com/questions/21390748/… there...