fola Posted March 29, 2010 Posted March 29, 2010 (edited) Hi, there i'm new in VB.NET & SQL. I have a customer form in VB.NET 2003 & my table in SQL EXPRESS 2008. I keep on getting this error message below at run time. An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Additional information: System error. The error message comes up when the line ' Dim ds As New DataSet' is being executed in the sub below. Please your help wil be kindly appreciated. sub UpdateCust Dim cstcode As Integer = CInt(Me.lblReg.Text) 'newtstrmkstore() Dim query As String = "UPDATE customer SET" & _ " name = " & UCase(Me.txtName.Text) & _ " ,add1 = " & UCase(Me.txtAdd1.Text) & _ " ,add2 = " & UCase(Me.txtAdd2.Text) & _ " ,phone = " & UCase(Me.txtPhone.Text) & _ " ,email_id = " & UCase(Me.txtEmail.Text) & _ " ,fax = " & UCase(Me.txtFax.Text) & _ " ,title = " & UCase(Me.cboTitle.Text) & _ ",cust_grp = " & UCase(Me.cboCustGrp.Text) & _ " ,state = " & UCase(Me.TxtState.Text) & _ " , dor = " & ResetStr(Me.dtpCustDate.Text) & _ " where cust_id=" & cstcode & " " MsgBox("Customer has been saved successfull" & Chr(13)) cn = New SqlConnection(Me.connectionstring) cn.Open() Dim ds As New DataSet Dim da As New SqlDataAdapter(query, cn) da.Fill(ds, "customer") cn.Close() da.Dispose() Edited March 29, 2010 by snarfblam Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.