Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record ID generator question
Message
From
27/02/2002 18:43:35
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00605839
Message ID:
00626105
Views:
30
Sorry to bother you with thi one again Michael. I am having difficulty executing the stored procedure. When I pasted in your code everythuing worked fine; however when I try to execute my stored procedure I get the error:

Procedure 'up_C_TB_InsertNewClient' expects parameter '@newID', which was not supplied.

My code for the stored procedure is as follows:
CREATE PROCEDURE up_C_TB_InsertNewClient

@newID int OUTPUT,
@LName varchar,
@FName varchar,
@Gender int,
@DOB smalldatetime

AS
INSERT INTO tblClientInfo
(LastName, FirstName, GenderID, DOB)
VALUES
(@LName, @FName, @Gender, @DOB)

IF @@ERROR <> 0
   BEGIN
      RETURN -1
END
/*SELECT SCOPE_IDENTITY() AS NewID*/
SET @newID = SCOPE_IDENTITY()
RETURN 0
GO
I am trying to execute with the following command in Query Analyzer:

EXEC up_C_TB_InsertNewClient @LName='Ruxpin', @FName='Teddy', @Gender=1, @DOB='01/oct/1974'

I haven't been able to find any help in Books Online so if you ahve any suggestions I would appreciate it. Thanks again.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform