Top "Sqlparameter" questions

a .NET class for representing SQL parameters in SqlCommands

SqlParameter does not allows Table name - other options without sql injection attack?

I got a runtime error saying "Must declare the table variable "@parmTableName". Meaning having table name as sql parameter in …

c# sql-server sql-server-2008 sqlparameter
How do I pass a null value into a parameter for a SqlCommand

Before anyone comments that this has been answered before in other question I KNOW that..but in spite of the …

c# sql-server dbnull sqlparameter
Difference between DbNull.Value and DbNull.Value.ToString()

I wanted to learn which usage is true? if(!string.IsNullOrEmpty(parentID)) cmd.Parameters.Add(new SqlParameter("@ParentSesID", parentID)); else …

c# dbnull sqlparameter
sqlParameters Array in VB.Net

I'm trying to create a typed-sized parameters array in VB.Net: Dim parameters() As SqlParameter = New SqlParameter() _ { New SqlParameter("@first_…

arrays vb.net sqlparameter
What does SqlDbType.Structured mean?

From msdn website I get the following: A special data type for specifying structured data contained in table-valued parameters. It …

c# sqlcommand sqlparameter sqldbtype
How to insert multiple records into database with SqlParameter in C#

I am trying to run the following code: using (SqlConnection conn = new SqlConnection(connstr)) { conn.Open(); StringBuilder sqlStr = new StringBuilder("…

c# sql-server sqlparameter
C# - Output SqlParameter uses different values then the ones given?

I have a SqlCommand which runs a stored procedure that contains two integer output parameters. Right before the SqlCommand runs …

c# sqlcommand output-parameter sqlparameter
SqlParameter with default value set to 0 doesn't work as expected

I was doing something like this: SqlParameter param = new SqlParameter("@Param", 0) { SqlDbType = SqlDbType.Int }; private void TestParam(SqlParameter param) { string …

c# .net .net-3.5 sqlparameter
How to pass correct object value in SqlParameter for datatype bit?

I am trying to pass a bit value only if needed (is checked). How do I do this correctly? I …

c# sqlparameter
Difference between SqlParameter.Add and AddWithValue

Possible Duplicate: Difference between Parameters.Add and Parameters.AddWithValue From MSDN code, what is the difference between these two: SqlCommand …

c# .net .net-3.5 sqlparameter