Hi, I'm using a stored procedure that outputs an @@IDENTITY value like so :
ALTER Procedure spClientInsert
@Soscis int,
@firstname varchar(50),
@lastname varchar(50),
@address1 varchar(50),
@address2 varchar(50),
@address3 varchar(50),
@PostCode varchar(50),
@HomePhone varchar(50),
@EmergencyPhone varchar(50),
@MobilePhone varchar(50),
@Fax varchar(50),
@Email varchar(50),
@Gender varchar(50),
@Religion varchar(50),
@EthnicOrigin varchar(50),
@ReferredBy varchar(50),
@FundingAuthority varchar(50),
@Centre varchar(50),
@WheelChair varchar(50),
@Section varchar(50),
@KeyworkerID int,
@ClientID INT OUTPUT
As
SET NOCOUNT ON
INSERT tblClientDetails(Soscis,firstname,lastname, address1,address2,address3, PostCode, Homephone, EmergencyPhone, MobilePhone, Fax, Email, Gender, Religion, EthnicOrigin, ReferredBy,
FundingAuthority, Centre, WheelChair, Section, KeyworkerID)
values (@Soscis,@firstname,@lastname, @address1,@address2,@address3, @PostCode, @Homephone, @EmergencyPhone, @MobilePhone, @Fax, @Email, @Gender, @Religion, @EthnicOrigin,
@ReferredBy, @FundingAuthority, @Centre, @WheelChair, @Section, @KeyworkerID)
SELECT @ClientID = @@IDENTITY
This sproc saves just fine, proving that there is nothing wrong with its syntax, however when i call it from within my VB program, i get this error message :
'-2147217900, [Microsoft][ODBC SQL SERVER DRIVER][SQL SERVER]Procedure 'spClientInsert' expects parameter '@ClientID', which was not supplied '
I have no idea why it seems to think that @ClientID is an INPUT parameter as opposed to an OUTPUT One. Any suggestions would be greatly appreciated
Thanks

ALTER Procedure spClientInsert
@Soscis int,
@firstname varchar(50),
@lastname varchar(50),
@address1 varchar(50),
@address2 varchar(50),
@address3 varchar(50),
@PostCode varchar(50),
@HomePhone varchar(50),
@EmergencyPhone varchar(50),
@MobilePhone varchar(50),
@Fax varchar(50),
@Email varchar(50),
@Gender varchar(50),
@Religion varchar(50),
@EthnicOrigin varchar(50),
@ReferredBy varchar(50),
@FundingAuthority varchar(50),
@Centre varchar(50),
@WheelChair varchar(50),
@Section varchar(50),
@KeyworkerID int,
@ClientID INT OUTPUT
As
SET NOCOUNT ON
INSERT tblClientDetails(Soscis,firstname,lastname, address1,address2,address3, PostCode, Homephone, EmergencyPhone, MobilePhone, Fax, Email, Gender, Religion, EthnicOrigin, ReferredBy,
FundingAuthority, Centre, WheelChair, Section, KeyworkerID)
values (@Soscis,@firstname,@lastname, @address1,@address2,@address3, @PostCode, @Homephone, @EmergencyPhone, @MobilePhone, @Fax, @Email, @Gender, @Religion, @EthnicOrigin,
@ReferredBy, @FundingAuthority, @Centre, @WheelChair, @Section, @KeyworkerID)
SELECT @ClientID = @@IDENTITY
This sproc saves just fine, proving that there is nothing wrong with its syntax, however when i call it from within my VB program, i get this error message :
'-2147217900, [Microsoft][ODBC SQL SERVER DRIVER][SQL SERVER]Procedure 'spClientInsert' expects parameter '@ClientID', which was not supplied '
I have no idea why it seems to think that @ClientID is an INPUT parameter as opposed to an OUTPUT One. Any suggestions would be greatly appreciated
Thanks