问题描述
您好,
我想创建一个简单的Web应用程序来学习asp.net。
我正在尝试练习同时使用sql server 2008并将应用程序与数据库连接。
我的问题是如何使用我的sql server管理工作室设置本地数据库?以及我如何将它与asp.net应用程序连接起来?
我在网上看到了很多教程,但是当我尝试它们时我失败了,我有很多错误而且我是新的sql server和asp.net,我无法解决它们中的任何一个。
当我试图连接到数据库时,我收到以下错误从代码:
用户登录失败''''
当我尝试设置数据库登录时出现以下错误权限:
标题:Microsoft SQL Server管理工作室
----------------- -------------
用户dbo失败。 (Microsoft.SqlServer.Smo)
如需帮助,请单击:
----------------------- -------
附加信息:
执行Transact-SQL语句或批处理时发生异常。 (Microsoft.SqlServer.ConnectionInfo)
--------------------------- ---
无法改变用户''dbo''。 (Microsoft SQL Server,错误:15150)
如需帮助,请单击:
------------------- -----------
按钮:
OK
---- --------------------------
有谁知道一个很好的教程我一步一步?
谢谢
Hello,
I want to create a simple web application to learn asp.net.
I''m trying to practice a sql server 2008 in the same time and connect the application with the database.
My question is how can i set a local database with my sql server management studio? and how i can connect it with the asp.net application?
I saw a lot of tutorials on the net but i failed when i tried them, i had lot of errors and i''m new with sql server and asp.net and i could not solve any of them.
I''m getting the following error when i''m trying to connect to the database from the code:
Login failed for user ''''
And the following error when i try to set the database log in and permissions:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Alter failed for User ''dbo''. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+User&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot alter the user ''dbo''. (Microsoft SQL Server, Error: 15150)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.5000&EvtSrc=MSSQLServer&EvtID=15150&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Do anyone know a good tutorial that leads me step by step?
Thanks
推荐答案
这篇关于从Web应用程序连接到SQL Server 2008数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!