Answered
Empty datefield not passing any parameter?
I'm entering service calls (date requested (DateCalled), date
performed (DateService), tech name, notes) into a db. I'm using the
same form to edit existing calls or add new ones. I want the
ability to add a record without submitting the date performed (so
the user can edit that record with the data later).
I've put in code that compares the two dates to make sure the date performed isn't before the date requested, and to make sure the date performed isn't in the future. All that works. When I try to add a condition to test for an empty string, I get a "Formal parameter '@TNotes' was defined as OUTPUT but the actual parameter not declared OUTPUT." error -- and the procedures all work FINE except in this one instance, so I don't want to change the stored procedures.
This breaks both on new records, and if you edit an existing record to remove the DateService. It seems to me that the empty string isn't getting passed to the db at all, because I think that error indicates that my stored procedure is expecting more (or maybe fewer somehow) parameters than it got.
Any insights or hints are welcomed. I'm attaching a pile of code. First section displays form to edit existing record/add new one. Second is the action page to edit/add the record. Last three bits are the stored procedures.
I've put in code that compares the two dates to make sure the date performed isn't before the date requested, and to make sure the date performed isn't in the future. All that works. When I try to add a condition to test for an empty string, I get a "Formal parameter '@TNotes' was defined as OUTPUT but the actual parameter not declared OUTPUT." error -- and the procedures all work FINE except in this one instance, so I don't want to change the stored procedures.
This breaks both on new records, and if you edit an existing record to remove the DateService. It seems to me that the empty string isn't getting passed to the db at all, because I think that error indicates that my stored procedure is expecting more (or maybe fewer somehow) parameters than it got.
Any insights or hints are welcomed. I'm attaching a pile of code. First section displays form to edit existing record/add new one. Second is the action page to edit/add the record. Last three bits are the stored procedures.