Hi Good Guys and Helpers
I have received an error message which I could not figure it out.
Error message
No mapping exists from object type System.Windows.Forms.TextBox to a known Manage provider native type
-------------------------------------------------------------------
The code below generates this error message at runtime.
Code:Private Sub FUpdateExistingRecord() try Dim strSql As String = Nothing strSql = "Update TestCustomers" strSql &= " Set CompanyName = @custName " strSql &= " Where CustomerId = @CustID" sqlconn = New SqlConnection(connstr) sqlconn.Open() sqlCmd = New SqlCommand(strSql, sqlconn) With sqlCmd.Parameters .AddWithValue("@CustId", Me.txtCustID.Text) .AddWithValue("@CustName", Me.txtCompanyName.Text) End With sqlCmd.ExecuteNonQuery sqlconn.close Catch Ex as Exception messagebox.show(ex.message) End Try



Reply With Quote


Bookmarks