guest
|
Posted: 12/15/2003, 10:16 AM |
|
Hi Folks,
i have the following problem:
I want to access the SP below and created a Grid and Record Page for
it, configuring the alternative insert to the stored procedure:
- @RETURN_VALUE (return) URL
- @T1 and @T2 according to their values also URL
When I try to execute the form I get the following responses:
- Procedure or function insertTest has too many arguments specified.
When I remove the Return Value parameter, I get something along the
lines "Cannot insert NULL value....."
any ideas
-werner
--------------------------------------------------------------------------------------------------------------------------------
Stored Procedure:
ALTER PROCEDURE tpd.insertTest
( @T1 [datetime],
@T2 [datetime]
)
AS
DECLARE @T3 [int]
DECLARE @IDRET [int]
DECLARE @Error [int]
SET @T3=DateDiff(n,@T1, @T2)
INSERT INTO test
(
Startzeit,
Endzeit,
Differenz
)
VALUES
(
@T1,
@T2,
@T3
)
SET @ERROR = @@ERROR
if @ERROR !=0 GOTO ERROR_HANDLER
SET @IDRet=@@Identity
ERROR_HANDLER:
RETURN @Error
---------------------------------------------------------
TABLE:
CREATE TABLE [test] (
[testID] [int] IDENTITY (1, 1) NOT NULL ,
[Startzeit] [datetime] NULL ,
[Endzeit] [datetime] NULL ,
[Differenz] [int] NOT NULL ,
CONSTRAINT [PK_test] PRIMARY KEY CLUSTERED
(
[testID]
) ON [PRIMARY]
) ON [PRIMARY]
-----------------------------------------------------------------------
|
|
|
|
|