General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2005
>>>>>Hi
>>>>>
>>>>>I'm not suire hwo I do this.
>>>>>
>>>>>I have a stored procedure that I'm passing parameters to and I want to pass back a result.
>>>>>
>>>>>So I have
>>>>>
>>>>> EXEC @return_value = [dbo].[usp_Insert_Individual]
>>>>> @FamilyRef = NULL,
>>>>> @StatusRef = 87,
>>>>> @SoundexKey = NULL,
>>>>> @ExternalRef = NULL,
>>>>> @Title = @hf_in_title,
>>>>> @Forenames = @hf_in_forename,
>>>>> @Initials = @hf_in_initial,
>>>>> @Surname = @hf_in_surname,
>>>>> @Honours = NULL,
>>>>> @NewIndividualRef OUTPUT
>>>>>
>>>>>but I get an error
>>>>>
>>>>>Must pass parameter number 27 and subsequent parameters as '@name = value'. After the form '@name = value' has been used, all subsequent parameters must be passed in the form '@name = value'.
>>>>>
>>>>>So whats the best way to return the id of the new record inserted by usp_Insert_Individual.
>>>>
>>>>
>>>>Just a guess (since I'm useless at SQL): Put all the assingments with a @ on the right before any that do not ?
>>>
>>>Hi Viv
>>>
>>>thanks but its the OUTPUT parameter thats wrong. Worked ok till I added that.
>>
>>Ah well - I said I was useless :-{
>>See Sergey's up early tho'....
>
>Any riots your way :-).
I'm lying by a pool in the Dordogne. All quiet so far :-}
> I see the Gloucester boys where kicking off.
>Last time I was over there it looked like no money had been spent on the centre for about 30 years.
Haven't been to Gloucester for years. Work takes me to Bristol quite often - looks like there was a bit of aggro there as well....
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only