WEB开发网      婵犻潧鍊婚弲顐︽偟椤栨稓闄勯柦妯侯槸閻庤霉濠婂骸浜剧紒杈ㄥ笚閹峰懘鎮╅崹顐ゆ殸婵炴垶鎸撮崑鎾趁归悩鐑橆棄闁搞劌瀛╃粋宥夘敃閿濆柊锕傛煙鐎涙ê鐏f繝濠冨灴閹啴宕熼鍡╀紘婵炲濮惧Λ鍕叏閳哄懎绀夋繛鎴濈-楠炪垽鎮归崶褍妲婚柛銊ュ缁傚秹鏁撻敓锟� ---闂佹寧娲╅幏锟�
开发学院WEB开发ASP.NET 一些关于SQL2005+ASP.NET2.0的问题 阅读

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

 2006-05-14 17:08:54 来源:WEB开发网 闂侀潧妫撮幏锟�闂佸憡鍨电换鎰版儍椤掑倵鍋撳☉娆嶄沪缂傚稄鎷�婵犫拃鍛粶闁靛洤娲ㄩ埀顒佺⊕閵囩偟绱為敓锟�闂侀潧妫撮幏锟�  闂佺ǹ绻楀▍鏇㈠极閻愬灚瀚梺鍨儏閳ь剙绉归弻銊р偓闈涙啞閻h京鈧敻鍋婇崰鏍х暦閿燂拷
核心提示:一般我们能过VS2005的SQL explorer来添加一个本地的MDF文件,也许你可能会出现下面这个问题:Exception Details: System.Data.SqlClient.SqlException: The user instance login flag is not supported on th

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

Tags:一些 关于 SQL

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接