Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record ID generator question
Message
De
27/02/2002 18:43:35
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
29/01/2002 08:34:31
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00605839
Message ID:
00626105
Vues:
25
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform