We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

problem executing a parameterized command

Thread ID:




7947 Oct 15,2003 12:36 PM UTC WinForms 0
Tags: FAQ
Asked On October 15, 2003 12:36 PM UTC

Hi, I am trying to execute a parameterized command as follows: *********************************************** cn.Open() Dim sql As String = "Select creditlimit, vatcode from customers where Name = @v_name " Dim cmd As New System.Data.SqlClient.SqlCommand(sql, cn) cmd.Parameters.Add("v_name", "test") Dim dr As SqlClient.SqlDataReader = cmd.ExecuteReader dr.Read() cn.close() ************************************************* I am getting an error at the statement Dim dr As SqlClient.SqlDataReader = cmd.ExecuteReader as ********************************************* An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll Additional information: System error. *********************************************** It doesn't seem to have accepted the parameters. Please let me know what mistake I am doing in the above declaration. Thanks & Regards, Shailaja


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon