Hi All
i want to make a function in sql-server 7.0 that takes
three parameters and return one parameter.
i am presently doing like this
CREATE PROCEDURE hello @p1 integer, @p2 integer, @p3 integer, @dt1 datetime OUTPUT as
DECLARE @DT AS DATETIME
set @dt = '1/1/00'
set @dt1 = dateadd(day,@p1,@dt)
set @dt1 = dateadd(month,@p2,@dt1)
set @dt1 = dateadd(year,@p3,@dt1)
set @dt1 = dateadd(day,-1,@dt1)
set @dt1 = dateadd(month,-1,@dt1)
return
now i want to collect the return value from procedure into visual
basic variable.i am using OLEDB connection.
help me.
Gaurav
i want to make a function in sql-server 7.0 that takes
three parameters and return one parameter.
i am presently doing like this
CREATE PROCEDURE hello @p1 integer, @p2 integer, @p3 integer, @dt1 datetime OUTPUT as
DECLARE @DT AS DATETIME
set @dt = '1/1/00'
set @dt1 = dateadd(day,@p1,@dt)
set @dt1 = dateadd(month,@p2,@dt1)
set @dt1 = dateadd(year,@p3,@dt1)
set @dt1 = dateadd(day,-1,@dt1)
set @dt1 = dateadd(month,-1,@dt1)
return
now i want to collect the return value from procedure into visual
basic variable.i am using OLEDB connection.
help me.
Gaurav