All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
一些关于SQL2005+ASP.NET2.0的问题_[Asp.Net教程]

Writer: delv Article type: Programming skills(编程技巧) Time: 2014/1/6 9:08:41 Browse times: 405 Comment times: 0

一些关于SQL2005+ASP.NET2.0的问题_[Asp.Net教程]


Head photo

Go homepage
Upload pictures
Write articles

一些关于SQL2005+ASP.NET2.0的问题_[Asp.Net教程]

一般我们能过VS2005的SQL explorer来添加一个本地的MDF文件。也许你可能会出现下面这个问题:
Exception Details: System.Data.SqlClient.SqlException: The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

通过搜索。发现这里有我们所需要的信息:Error Message: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

仔细分析Scott的回答:

"The issue is that User Instancing, which allows the automatic creation of databases from code, isn't support on the full version of SQL 2005. That is a function of SQL Express only. The solution is to manually create the database in SQL Server 2005 and set a connection string to point to it. You will also need to run aspnet_regsql.exe manually against the database if you will be using any of the new built-in database features of ASP.NET v2.0."

因此,如果我们不是使用的从MS下载下来的SQL Server 2005 Express,那么我们只能过过在SQL2005管理器上把MDF文件添加进去在连接它。

解决方法:在SQL2005管理器上,通过Attach(附加)本地的MDF文件成功之后。在VS2005的sql explorer的连接即可。

以后继续补充。

cnzc's blogs





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.