song2siren
Programmer
Hi
I'm trying to send values from an ASP.NET page to a stored procedure which inserts them into a SQL database. I've got a list of parameters as follows;
myCommand.Parameters.Add( "@FirstName", frmFirstName.text )
myCommand.Parameters.Add( "@Surname", frmFirstName.text )
etc...
However, I need some kind of function which will test all of these for NULL values and then send a NULL value to the stored procedure. At the moment the fields in my SQL database are blank where there is no value, rather than showing <NULL>.
I'm sure this is fairly simple - any help would be much appreciated.
Thanks
I'm trying to send values from an ASP.NET page to a stored procedure which inserts them into a SQL database. I've got a list of parameters as follows;
myCommand.Parameters.Add( "@FirstName", frmFirstName.text )
myCommand.Parameters.Add( "@Surname", frmFirstName.text )
etc...
However, I need some kind of function which will test all of these for NULL values and then send a NULL value to the stored procedure. At the moment the fields in my SQL database are blank where there is no value, rather than showing <NULL>.
I'm sure this is fairly simple - any help would be much appreciated.
Thanks