Top "Sqlparameter" questions

a .NET class for representing SQL parameters in SqlCommands

Return value from OleDbCommand

sqlQuery = "SELECT [ID] from [users] WHERE CallerName=@CallerName"; OleDbConnection conn = new OleDbConnection(connectionString); conn.Open(); cmd = new OleDbCommand(sqlQuery, conn); …

c# sql parameters oledb sqlparameter
How to use SQL parameters to get dataset from SQL Server

I'm working on C# project and I'm new to this technology. I want to read some data from SQL Server 2008, …

c# sql sql-server sql-injection sqlparameter
Send a empty DateTime value into SQL stored procedure. But not null

I have an SQL stored procedure which accepts a DateTime parameter which has a default value of NULL @pmNext_Check_…

c# sql-server-2008 datetime sqlparameter
SqlCommand Parameters size confusion

I have the following line of code: sqlcommand.Parameters.Add("@LinkID", SqlDbType.Int, 4).Value = linkID; But, I'm slightly confused about …

c# sqlparameter
Escaping special characters in a SQL LIKE statement using sql parameters

I have a table containing products. I need to make a query finding all the matching results to an user-input …

c# sql sql-server escaping sqlparameter
SQLCommand.Parameters.Add - How to give decimal value size?

How would you specify this: Decimal(18,2) In this: SqlComm.Parameters.Add("@myValue", SqlDbType.Decimal, 0, "myValue"); Currently I have defined precision = 2 …

c# sqlparameter
poor performance with sqlparameter

I have a web service, so the handler is called multiple times concurrently all the time. Inside I create SqlConnection …

c# sql-server ado.net sqlcommand sqlparameter
SqlParameterCollection only accepts non-null SqlParameter type objects, not DBNull objects

When I add the SQL parameter p to the collection I get an InvalidCastException with the message from the post …

c# sql ado.net sqlparameter
Can I pass a SqlParameterCollection object into a SQL Command

I currently have a connection class that handles all of my database connectivity. What I am trying to do is …

parameter-passing sqlparameter
nVarchar and SqlParameter

I'm developing an application which must support several languages. To solve the special characters problem I'm using NVarhcar for my …

c# nvarchar sqlparameter