Procedure or function Authorize_Member has too many arguments specified

S

Seth Williams

I have a sqlDataSource, using a stored procedure - the datasource is:
<asp:SqlDataSource ID="dsMembers" runat="server"
ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
SelectCommand="Get_MemberToUpdate"
SelectCommandType="StoredProcedure"
UpdateCommand="Authorize_Member"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Name="MemberID"
QueryStringField="id" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:parameter Name="memberID" Type="Int32" />
<asp:parameter Name="Authorized" Type="Boolean" /> ' This is
a bit field in the database
</UpdateParameters>
</asp:SqlDataSource>

The DetailsView has the DataKeyNames property set correctly - - This was
working and I don't remember changing it in any way.
What could be the problem?
 
S

Seth Williams

I forgot to mention that I get this error message only when Updating
Here's the sProc:
create PROCEDURE [dbo].[Authorize_Member]
@memberID INT,
@Authorized Bit
AS
BEGIN
UPDATE [dbo].[Members]
SET [Authorized] = @Authorized
WHERE MemberID=@MemberID



I have a sqlDataSource, using a stored procedure - the datasource is:
<asp:SqlDataSource ID="dsMembers" runat="server"
ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
SelectCommand="Get_MemberToUpdate"
SelectCommandType="StoredProcedure"
UpdateCommand="Authorize_Member"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter Name="MemberID"
QueryStringField="id" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:parameter Name="memberID" Type="Int32" />
<asp:parameter Name="Authorized" Type="Boolean" /> ' This is
a bit field in the database
</UpdateParameters>
</asp:SqlDataSource>

The DetailsView has the DataKeyNames property set correctly - - This was
working and I don't remember changing it in any way.
What could be the problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top