|
 |
aspx thread: Null values with stored procedures in SQL
Message #1 by "J Donahue" <jdonahue@f...> on Fri, 27 Sep 2002 17:23:56
|
|
How do you pass a Null datetime and a Null integer to a stored
procedure?? I've tried countless ways but none seem to work.
I didn't design the tables and until I can convince someone to change the
structure I'm stuck trying to insert Null values via a stored procedure.
I know I could use a stored procedure to insert those items that aren't
Null and then use additional stored procedures to update those Null items
that have a value but that doesn't seem to be the most efficient.
Thanks!!!!!!!
Message #2 by Imar Spaanjaars <Imar@S...> on Fri, 27 Sep 2002 18:43:57 +0200
|
|
Hi there,
You should use DBNull.Value to pass NULL to a sproc. Works for me....
Cheers,
Imar
At 05:23 PM 9/27/2002 +0000, you wrote:
>How do you pass a Null datetime and a Null integer to a stored
>procedure?? I've tried countless ways but none seem to work.
>I didn't design the tables and until I can convince someone to change the
>structure I'm stuck trying to insert Null values via a stored procedure.
>I know I could use a stored procedure to insert those items that aren't
>Null and then use additional stored procedures to update those Null items
>that have a value but that doesn't seem to be the most efficient.
>Thanks!!!!!!!
>---
Message #3 by "Dave Buckner" <Dave@N...> on Fri, 27 Sep 2002 11:45:58 -0500
|
|
Try dbnull.value
Regards,
Dave
-----Original Message-----
From: J Donahue [mailto:jdonahue@f...]
Sent: Friday, September 27, 2002 5:24 PM
To: ASP+
Subject: [aspx] Null values with stored procedures in SQL
How do you pass a Null datetime and a Null integer to a stored
procedure?? I've tried countless ways but none seem to work.
I didn't design the tables and until I can convince someone to change
the
structure I'm stuck trying to insert Null values via a stored procedure.
I know I could use a stored procedure to insert those items that aren't
Null and then use additional stored procedures to update those Null
items
that have a value but that doesn't seem to be the most efficient.
Thanks!!!!!!!
---
ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442
ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450
These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.
---
|
|
 |