Q:

INSERT stored procedure not accepting null value

I have executed a SqlDataReader from a SELECT stored procedure, and am holding those values, some of which may be null...without my knowing.  I am trying to pass those values into the parameters of an INSERT stored procedure. 
When I attempt to pass the value I recieve this error:

"Proccedure or function 'insbuRenewal' expects parameter
  '@TransactionID', which was not supplied"

My code:
try
{
    while (reader. Read())
    {
        insbuRenewal. Parameters["@SolarID"].Value = (decimal)reader["SolarID"];
        insbuRenewal. Parameters["@ApplicationID"].Value
            = reader["ApplicationID"].ToDecimalOrNull();
        insbuRenewal. Parameters["@TransactionID"].Value
            = reader["TransactionID"].ToStringOrNull();
        insbuRenewal. Parameters["@Host"].Value
            = reader["Host"].ToStringOrNull();

    public static string ToStringOrNull(this object items)
    {
        if (items == null || items == DBNull. Value)
        {
            return null;
        }
        return items. ToString(); 
    }

A:

You could use the method you have if you did this:
insbuRenewal. Parameters. AddWithValue("@TransactionID",
    reader["TransactionID"].ToStringOrNull());

instead of:
insbuRenewal. Parameters["@TransactionID"].Value =
    reader["TransactionID"].ToStringOrNull();

The AddWithValue interface is a much better approach for all of your parameters.  Don't add them up front; add them on demand. 

As Yosi pointed out.  All you really need is this:
insbuRenewal. Parameters. AddWithValue("@TransactionID", reader["TransactionID"]);

