未能找到存储过程 .net 网站程序配置出错 环境win 2003 + MSSQL .net

[复制链接]
查看11 | 回复3 | 2011-7-24 00:58:16 | 显示全部楼层 |阅读模式
Server Error in '/' Application.
--------------------------------------------------------------------------------
未能找到存储过程 'Ws_UserPro_LoginCheck'。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: 未能找到存储过程 'Ws_UserPro_LoginCheck'。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: 未能找到存储过程 'Ws_UserPro_LoginCheck'。]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +44
WanerSoft.Data.Provider.MsSql.ExecuteReader(CommandType CmdType, String CmdText, SqlParameter[] CmdParameters, SqlTransaction Transaction, ConnClose ConnOwnership) +46
WanerSoft.Data.Factory.DAL.UserLoginCheck(String UserName, String UserPass) +105
WanerSoft.Web.UI.User.LoginCheck.Page_load(Object sender, EventArgs e) +318
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2443; ASP.NET Version:1.1.4322.2470

回复

使用道具 举报

千问 | 2011-7-24 00:58:16 | 显示全部楼层
你复制,或者加载的别人的数据库吧,存储过程丢失导致出了这个错误,你要重新还原数据库中的存储过程。你的MSSQL是2000还是2005?如果是2000的话,打开对应数据库,里面有一项就是“存储过程”,新建一个叫Ws_UserPro_LoginCheck的存储过程,然后还原他原来的代码就可以了。...
回复

使用道具 举报

千问 | 2011-7-24 00:58:16 | 显示全部楼层
1、先实例化MySqlConnection2、再sqlcon.Open();3、实例化MySqlCommand的时候使用这种构造方法:“SqlCommand 构造函数 (String, SqlConnection) ”或者赋值“Connection ”属性。...
回复

使用道具 举报

千问 | 2011-7-24 00:58:16 | 显示全部楼层
看了你的代码,有个问题,你对MySqlCommand实例化的时候使用了空参数的构造方法。而没有把SqlConnection加入其中,所以你的MySqlCommand是没有连接的,就算你在下面执行了sqlcon.Open()也是没用。建议这样修改:1、先实例化MySqlConnection2、再sqlcon.Open();3、实例化MySqlC...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行