Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
error on runtime-Maximum stored procedure, function, trigger, or view nesting level exceeded

html:
In DataList:-
HTML
<itemtemplate>
                    <tr>
                        <td>
                            <%#Eval("e_id") %>
                        </td>
                        <td>
                            <%#Eval("e_name") %>
                        </td>
                        <td>
                            <%#Eval("e_sal") %>
                        </td>
                    </tr>
                
</itemtemplate>



code(.cs):
C#
protected void Page_Load(object sender, EventArgs e)
        {
SqlConnection con = new SqlConnection(str_con);
            con.Open();
            SqlCommand cmd = new SqlCommand("getdata", con);
            cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);<<------------error
DataList1.DataSource = ds;
            DataList1.DataBind();
            con.Close();


It was working fine but now same code is giving error!! :(
Posted
Updated 28-Nov-11 21:36pm
v3

1 solution

you can try this
use
C#
da.Fill(ds,"tablename");
instead of
C#
da.Fill(ds);

hope it will helps

for above error see this thread
procedure-maximum-stored-procedure-function-trigger-or-view-nesting-level-exc
 
Share this answer
 
v3
Comments
07navneet 29-Nov-11 4:13am    
I have tried it but didnt work!
uspatel 29-Nov-11 4:56am    
share stored procedure code
07navneet 29-Nov-11 5:22am    
Stored Procedure:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[getdata]
as
begin
select*from emp
end
07navneet 30-Nov-11 5:21am    
Please help, somebody!
uspatel 30-Nov-11 10:20am    
It runs successfully.It have no problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900