I'm getting an error when trying to insert a parent and/or child record. The error says "Procedure or function usp_ins_Chart_Review_Claim has too many arguments specified." I've checked the stored procedures and they both have the same number of parameters that are in their section.
Here is what the datasource code looks like:
<ig:WebHierarchicalDataSource ID="WHDS_Claims_and_Diags" runat="server">
<DataViews>
<ig:DataView ID="dsClaims_DefaultView" DataMember="DefaultView" DataSourceID="dsClaims" />
<ig:DataView ID="dsDiags_DefaultView" DataMember="DefaultView" DataSourceID="dsDiags" />
DataViews>
<DataRelations>
<ig:DataRelation ChildColumns="Original_Claim_ID" ChildDataViewID="dsDiags_DefaultView" ParentColumns="Original_Claim_ID" ParentDataViewID="dsClaims_DefaultView" />
DataRelations>
ig:WebHierarchicalDataSource>
<asp:SqlDataSource ID="dsClaims" runat="server" ConnectionString="<%$ ConnectionStrings:cs_CHP_EDPS %>" InsertCommand="usp_ins_Chart_Review_Claim" InsertCommandType="StoredProcedure" OnInserting="dsClaims_Inserting" SelectCommand="usp_get_Chart_Review_Claims_in_Prev_Year" SelectCommandType="StoredProcedure">
<InsertParameters>
<asp:Parameter Name="Member_ID" Type="String" />
<asp:Parameter DbType="Date" Name="Start_Date" />
<asp:Parameter DbType="Date" Name="End_Date" />
<asp:Parameter Name="User_Name" Type="String" />
InsertParameters>
<SelectParameters>
<asp:QueryStringParameter Name="Member_ID" QueryStringField="Member_ID" Type="String" />
<asp:QueryStringParameter Name="HCC" QueryStringField="HCC" Type="Int32" />
SelectParameters>
asp:SqlDataSource>
<asp:SqlDataSource ID="dsDiags" runat="server" ConnectionString="<%$ ConnectionStrings:cs_CHP_EDPS %>" DeleteCommand="usp_del_Chart_Review_Diag" DeleteCommandType="StoredProcedure" OnDeleting="dsDiags_Deleting" InsertCommand="usp_ins_Chart_Review_Diag" InsertCommandType="StoredProcedure" OnInserting="dsDiags_Inserting" SelectCommand="usp_get_Chart_Review_Claim_Diags" SelectCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="Row_ID" Type="Int32" />
DeleteParameters>
<asp:Parameter Name="Claim_ID" Type="String" />
<asp:Parameter Name="Diag" Type="String" />
Sorry about that. When I was posting the initial question, I was trying to "simplify" the parameters by making the parameter Claim_ID instead of Original_Claim_ID. When I was running it and receiving the error, it was set to Original_Claim_ID. I have corrected it and attached the corrected logic for you. What format should I send the data in? What will work best for you?
Hello Angela,
Thank you for your sample.
Could send me a sample database to help me get the project working?
I also noticed that one of the insert parameters in the usp "usp_ins_Chart_Review_Diag" should be "Original_Claim_ID" but you are passing "Claim_ID" to it.
I am looking forward to hearing from you.
I have attached the sample. Thank you for your help.
Hello algunderson,
Thank you for contacting Infragistics support.
Everything looks correct. Could you send us a working isolated sample demonstrating the issue so I could further investigate?