-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: VinodK [TLabs, SCT]
Message 3 in Discussion

See the following script ... You would need to explicitly pass a NULL to the SP to 
store a NULL ... If you have a default value then you neednot pass the value also ... 
See the example given below ...   -- Create a temp table for example
create table vin_date (id int, test datetime)
Insert into vin_date values (1,NULL)
GO
-- Creating the Procedure with default value
Create Procedure Null_Date (@id int, @test DateTime = NULL)
As
Insert into vin_date values (@id ,@test)
GO
-- Use without passing the parameter
Exec Null_Date @id=2
GO
-- Passing explicit NULL 
Exec Null_Date @id=3, @test=NULL
GO
-- See the results
Select * from vin_Date
GO
-- Cleanup activity
-- Drop table vin_date    HTH, Vinod Kumar SCT Software Solutions  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to