|
-
February 14th, 2000, 03:15 PM
#1
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.
-
February 15th, 2000, 04:48 AM
#2
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.
-
February 16th, 2000, 01:13 PM
#3
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 ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|