那看你的SQL SERVER   有没打开呀具体错误贴出来

解决方案 »

  1.   

    提示如下错误:
    “/jhteleoa”应用程序中的服务器错误。
    --------------------------------------------------------------------------------未能找到存储过程 'sql'。 
    说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: 未能找到存储过程 'sql'。源错误: 
    行 53:  SqlDataAdapter myCommand = new SqlDataAdapter("sql",myConnection);
    行 54:  DataSet ds = new DataSet();
    行 55:  myCommand.Fill(ds);
    行 56:  DataView sounce = new DataView(ds.Tables[0]);
    行 57:  DataGrid1.DataSource = sounce;
     源文件: c:\inetpub\wwwroot\jhteleoa\oafile\oafile_text.aspx.cs    行: 55 堆栈跟踪: 
    [SqlException: 未能找到存储过程 'sql'。]
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
       System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
       System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
       jhteleoa.oafile.oafile_text.ListToGrid(String id, String D_Style) in c:\inetpub\wwwroot\jhteleoa\oafile\oafile_text.aspx.cs:55
       jhteleoa.oafile.oafile_text.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\jhteleoa\oafile\oafile_text.aspx.cs:34
       System.Web.UI.Control.OnLoad(EventArgs e) +67
       System.Web.UI.Control.LoadRecursive() +35
       System.Web.UI.Page.ProcessRequestMain() +731 
    --------------------------------------------------------------------------------
    版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573