RadarBob
08-06-2002, 04:20 PM
All;
I am stuffing the values from the Request.form collection into a MS SQL server 7 database via a stored procedure.
This is the error I'm getting:
----------------------------------------------------------
Database Error(s) encountered executing:
----------------------------
Native Error = 201 SQLState = 42000 Error# = -2147217904
Error description = Procedure 'up_scDBAdd' expects parameter '@CitationFed', which was not supplied.
Error source = Microsoft OLE DB Provider for SQL Server
----------------------------------------------------------
However, the process is working when the field has some text; but not when I've set it to null. An empty string is valid under certain conditions (which I'm checking for in the usual form validation prior to SUBMITting).
My question is: "Can I pass a string that is empty? If so, how?" This is distinctly different from passing a string with one (or more) blank characters. I do not want to use blanks in the database field when I mean "empty".
NOTE: code snippets are in Javascript
Here's the form object:
<td colspan=4>
<span id="StateCitation" style="visibility:hidden;">
<b>State Citation: </b>
<input type="text" name="fCitationState" size=50 value = "">
</span>
</td>
Here is how I set it's value to empty:
theform.fCitationState.value = "";
BTW, is the above different from
theform.fCitationState.value = null;
I am stuffing the values from the Request.form collection into a MS SQL server 7 database via a stored procedure.
This is the error I'm getting:
----------------------------------------------------------
Database Error(s) encountered executing:
----------------------------
Native Error = 201 SQLState = 42000 Error# = -2147217904
Error description = Procedure 'up_scDBAdd' expects parameter '@CitationFed', which was not supplied.
Error source = Microsoft OLE DB Provider for SQL Server
----------------------------------------------------------
However, the process is working when the field has some text; but not when I've set it to null. An empty string is valid under certain conditions (which I'm checking for in the usual form validation prior to SUBMITting).
My question is: "Can I pass a string that is empty? If so, how?" This is distinctly different from passing a string with one (or more) blank characters. I do not want to use blanks in the database field when I mean "empty".
NOTE: code snippets are in Javascript
Here's the form object:
<td colspan=4>
<span id="StateCitation" style="visibility:hidden;">
<b>State Citation: </b>
<input type="text" name="fCitationState" size=50 value = "">
</span>
</td>
Here is how I set it's value to empty:
theform.fCitationState.value = "";
BTW, is the above different from
theform.fCitationState.value = null;