>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?
Are you using ASP.NET or Windows Forms? I know that for ASP.NET you can specify special property on SQLDataSource parameter to convert empty string to NULL.
If it's not broken, fix it until it is.
My Blog