How To Use NULL Date Field When Calling Stored Procedure with ADO
Hello,
I am trying to call a stored procedure with ADO. For some of the parameters for this procedure, I wish to use DATETIME. My problem occurs when I want to pass a NULL value. When I set theCmd.Parameters.Item("Date").Value = NULL, I later get the following error from the err object. [Microsoft][ODBC SQL Server Driver]Syntax error converting DATETIME from character string. The table in the database allows nulls, but I can seem to add one with VB. Please help me figure out what is wrong.
Thanks.
Re: How To Use NULL Date Field When Calling Stored Procedure with ADO
use datatype "Variant" instead of "Datetime".
That will allow you to assign NULL.
Re: How To Use NULL Date Field When Calling Stored Procedure with ADO
Well, I would like to get some help on the stored procedures....can u please tell me how to do it ?
Can it just be done with sql-server ?