【发布时间】:2010-07-23 22:52:46
【问题描述】:
StackOverflow - 我仍在尝试部署此站点,但随着我解决的每一个问题,都会出现另一个问题。无论如何 - 我已经在我的主机上设置了数据库以允许远程连接,它正在运行 Sql Server 2005。在我的开发机器上,我正在使用 Sql Server 2008。
我已经在我的托管数据库上安装了 asp.net 架构,并从 ASP.NET Web 管理界面创建了几个用户,并测试了登录是否有效。使用远程连接字符串在本地运行应用程序会得到相同的结果。但是 - 我能够运行我的脚本并生成我的表和存储过程而不会出现错误 - 但是当网站运行时,我在尝试访问存储过程的所有 .aspx 页面上都收到以下错误:
Server Error in '/' Application.
Incorrect syntax near 'LoadProfileData'.
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: Incorrect syntax near 'LoadProfileData'.
Source Error:
Line 62: adapter.SelectCommand.Parameters.Add("@ProfessionalName", SqlDbType.VarChar).Value = professionalName;
Line 63: DataSet profile = new DataSet();
Line 64: adapter.Fill(profile, "Profile");
Line 65: return profile;
Line 66: }
这可能是 Sql 2005 vs 2008 的问题吗?我希望其他人在类似的情况下也看到了这个问题,并能指出我正确的方向。服务器正在运行 asp.net 2.0、3.0 和 3.5 以及 IIS 7.0。
【问题讨论】:
标签: sql-server-2005 sql-server-2008 asp.net sql