Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 1st, 2005, 03:57 PM
yogaboy yogaboy is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Near London
Posts: 112 yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 37 m 29 sec
Reputation Power: 5
Question Can't get the OUTPUT from my sp!

Hi, I'm a novice at writing stored procedures and I can't see why this won't work. I get the following error message when I call the sp below
Must pass parameter number 3 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'.

I'd really appreciate a bit of help as I am really stuck.
Iain

Code:
CREATE PROCEDURE dbo.uspInsertPersonalInvoice
(
@ClientID smallint = 6,
@InvoiceTotal smallmoney,
@TheScope int OUTPUT
)
AS
 SET NOCOUNT ON
 INSERT INTO dbo.Personal_Invoice
	(DateCreated, ClientID, InvoiceTotal, DateSent)
 	VALUES
	(GETDATE(), @ClientID, @InvoiceTotal, GETDATE())
 SET @TheScope = SCOPE_IDENTITY() 
 SET NOCOUNT OFF


and to call it
Code:
DECLARE @TheID int
exec dbo.uspInsertPersonalInvoice 
@ClientID = 6
, @InvoiceTotal = 257.96
, @TheID OUTPUT 
SELECT @TheID

Reply With Quote
  #2  
Old April 3rd, 2005, 06:25 PM
yogaboy yogaboy is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: Near London
Posts: 112 yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level)yogaboy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 37 m 29 sec
Reputation Power: 5
This is fixed now.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Can't get the OUTPUT from my sp!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT