i am working on a windows application made in C# dotnet 2005.
in this i have a form which have a list which gets filled from another table.
basically i have a column in a table which is forgein key.
now i wrote a update query and i want to insert null if user does not select any item from the list.
and this column is of int type in the database.
and i am using SQLParameter class to add values in update query.
here is a sample code of how i am using SQLParameter class
SqlParameter SqlParam_GeneralLedgerAcco
untOID = new SqlParameter();
SqlParam_GeneralLedgerAcco
untOID.Par
ameterName
= "@OID";
SqlParam_GeneralLedgerAcco
untOID.Val
ue = OID;
command.Parameters.Add(Sql
Param_Gene
ralLedgerA
ccountOID)
;
how can insert null value using SQLparameter class
Start Free Trial