Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored procedure null problem

Status
Not open for further replies.

jcisco

Programmer
Sep 17, 2002
125
US
I'm having a problem passing in null values to a stored procedure. can someone please point out where i'm going wrong with this.

--Procedure def
CREATE PROCEDURE sp_rptbl_Fill
@inDate SmallDateTime,
@sDate smalldateTime,
@eDate smalldateTime

--VB solution
SqlConnection1.Open()
SqlCommand1.Parameters("@inDate").Value = Me.Calendar1.SelectedDate
SqlCommand1.Parameters("@sDate").Value = nothing
SqlCommand1.Parameters("@eDate").Value = nothing
SqlCommand1.ExecuteNonQuery()
SqlConnection1.Close()

--Here is the err i'm getting
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

thanks
john

--------------
:)
 
sorry solved my own problem i needed to use
System.DBNull.Value

--------------
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top