I have a somewhat simple question.
I have a select box in a form and the selection will then be sent to a function that adds a record in a sql db. The field that I'm adding the data to is an integer field. Here's the situation. If the user does not choose a selection...hence select1 = "" then I get a message saying:
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation
On the other hand. If I actually set the selection to null in the code then send it to the function that is adding the record in the db, it all works fine.
If select1 = "" then
select1 = null
end if
Well, being that there are many other fields in the form,
it seems inefficient to check all the fields for emptiness and set it to null. Is there some other way of dealing w/ this situation?
Thanks in advance.
I have a select box in a form and the selection will then be sent to a function that adds a record in a sql db. The field that I'm adding the data to is an integer field. Here's the situation. If the user does not choose a selection...hence select1 = "" then I get a message saying:
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation
On the other hand. If I actually set the selection to null in the code then send it to the function that is adding the record in the db, it all works fine.
If select1 = "" then
select1 = null
end if
Well, being that there are many other fields in the form,
it seems inefficient to check all the fields for emptiness and set it to null. Is there some other way of dealing w/ this situation?
Thanks in advance.