0 LIKES LikeUnLike
I had create a database call Customers. I wanted to update the CPHONE. After running it i got "err msg" instead of updating the CPHONE. Please help. cnnstr = "Provider=SQLOLEDB;" & _ "Data Source=ABC\SQLEXPRESS;" & _ "Initial Catalog= XYZ;" & _ "Integrated Security=SSPI;" & _ "uid=;pwd=;" Dim myConnection As OleDbConnection = New OleDbConnection(cnnstr) myConnection.Open() Dim SQLStr As String SQLStr = "update Customers set CPHONE= " & NewMobileTextBox.Text & " where CNAME =" & CustomerNameTextBox.Text & " " Dim myCmd As New OleDbCommand myCmd.Connection = myConnection myCmd.CommandText = SQLStr myCmd.CommandType = CommandType.Text Try myCmd.ExecuteNonQuery() MessageBox.Show("Customer account updated") Catch ex As Exception MessageBox.Show("err msg") myConnection.Close() End Try
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 1 answers.