Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
error on runtime-Maximum stored procedure, function, trigger, or view nesting level exceeded
 
html:
In DataList:-
<itemtemplate>
                    <tr>
                        <td>
                            <%#Eval("e_id") %>
                        </td>
                        <td>
                            <%#Eval("e_name") %>
                        </td>
                        <td>
                            <%#Eval("e_sal") %>
                        </td>
                    </tr>
                
</itemtemplate>

 
code(.cs):
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 28-Nov-11 22:13pm
Edited 28-Nov-11 22:36pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you can try this
use
 
 da.Fill(ds,"tablename");
instead of
da.Fill(ds);
hope it will helps
 
for above error see this thread
procedure-maximum-stored-procedure-function-trigger-or-view-nesting-level-exc
  Permalink  
v3
Comments
07navneet at 29-Nov-11 4:13am
   
I have tried it but didnt work!
Uma Shankar Patel at 29-Nov-11 4:56am
   
share stored procedure code
07navneet at 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 at 30-Nov-11 5:21am
   
Please help, somebody!
Uma Shankar Patel at 30-Nov-11 10:20am
   
It runs successfully.It have no problem.
07navneet at 1-Dec-11 5:09am
   
Sir, is there a problem in my PC, due to which its not executing this code properly??
Uma Shankar Patel at 1-Dec-11 5:32am
   
try to bind with direct query.
Uma Shankar Patel at 1-Dec-11 5:36am
   
once try, may be it run.
SqlConnection con = new SqlConnection(str_con);
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection=con;
cmd.CommandText="getdata";
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);<<------------error
DataList1.DataSource = ds;
DataList1.DataBind();
con.Close();
07navneet at 3-Dec-11 2:03am
   
Sorry! But getting same result. Also my previously asked question was also unsolved and till now I am not able to perform DML operations(insert/update/delete) using ASP.NET.
I am about to give up with ASP.NET!!

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 485
1 BillWoodruff 330
2 OriginalGriff 310
3 Shweta N Mishra 244
4 Mathew Soji 225
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,758
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,735


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 29 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100