首页 > 编程 > .NET > 正文

一些关于SQL2005+ASP.NET2.0的问题

2024-07-10 13:10:47
字体:
来源:转载
供稿:网友

一般我们能过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

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表