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 September 8th, 2004, 04:29 PM
dcampos's Avatar
dcampos dcampos is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 234 dcampos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 7 h 54 m 13 sec
Reputation Power: 5
Talking Too many arguments specified

I'm working with some Stored Procedures that have been encrypted. I've decrypted the stored procedures and I can see everything that is contained in the stored procedure. When I try and add new fields to the query in the SQL I keep receivin the following message:

[Microsoft][ODBC SQL Server Driver][SQL Server]Procedure or function sp_ShoppingGuide_GetArchivedRequestsByMAT2 has too many arguments specified.

I've added one more field and then renamed the Stored Procedure by adding a number 2 at the end. I've changed the name in my code, and the previous error is what I keep getting. Any insight on this? Thanks.

Reply With Quote
  #2  
Old September 8th, 2004, 04:31 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
post the code in the procedure.

Reply With Quote
  #3  
Old September 8th, 2004, 04:37 PM
dcampos's Avatar
dcampos dcampos is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 234 dcampos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 7 h 54 m 13 sec
Reputation Power: 5
Quote:
Originally Posted by Memnoch
post the code in the procedure.

I've tried even just copying the same exact code and just renaming the stored procedure and i still receive the same error.

CREATE PROCEDURE sp_ShoppingGuide_GetArchivedRequestsByMAT
@UserID int = NULL,
@StartDate datetime,
@EndDate datetime,
@UnitID int = NULL
with encryption
AS
SET @UserID = CASE WHEN @UserID IS NULL THEN 0 ELSE @UserID END
SET @EndDate = @EndDate + 1
SET @UnitID = CASE WHEN @UnitID IS NULL THEN 0 ELSE @UnitID END
EXECUTE('
SET CONCAT_NULL_YIELDS_NULL OFF
SELECT
a.RequestID,
b.StatusID,
-- a.Archived,
-- a.DateArchived,
a.DateEntered,
a.Enteredby,
b.Quantity,
b.Comments,
c.ItemID,
c.ItemName,
c.CatalogNumber,
c.ServiceCode,
f.UnitName,
c.VendorName,
FullName = dbo.udf_Utils_FormatFullName(e.Lastname, e.Firstname, e.MiddleName)
FROM ShoppingGuide_Requests a
INNER JOIN ShoppingGuide_RequestDetails b ON (a.RequestID=b.RequestID AND b.StatusID=100)
LEFT JOIN ShoppingGuide_Items c ON b.ItemID=c.ItemID
LEFT JOIN Emp_UserJob d ON a.UserJobID=d.UserJobID
LEFT JOIN Emp_Users e ON (d.UserID=e.UserID)
LEFT JOIN Emp_Units f ON (d.UnitID=f.UnitID)
WHERE
(a.Enteredby=' + @UserID + ' OR ' + @UserID + '=0)
AND a.DateEntered BETWEEN ''' + @StartDate + ''' AND ''' + @EndDate + '''
AND (d.UnitID=' + @UnitID + ' OR ' + @UnitID + '=0)
ORDER BY a.RequestID DESC, c.ItemName
')

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Too many arguments specified


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