>I have the following piece of code:
>
>
>SqlParameter PartDesc = new SqlParameter();
>PartDesc.SqlDbType = SqlDbType.VarChar;
>PartDesc.ParameterName = "@Part_Description";
>PartDesc.Value = txtPartDesc.Text;
>
>
>If the user didn't type anything into the txtPartDesc field, how would ensure that NULL was passed to the stored procedure?
You could also make the parameter option in your query and default it to NULL. Test the value of the txtPartDesc.Text and conditionally provide the parameter.