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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

problem executing a parameterized command

Thread ID:

Created:

Platform:

Replies:

7947 Oct 15,2003 12:36 PM UTC WinForms 0
loading
Tags: FAQ
Shailaja
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

CONFIRMATION

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.

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

;