当我将它连接到我们的服务器并尝试创建一个新的Sql表时,我的c#有问题。我发现了这个错误。请帮助我! [英] i have problem in my c# when i connect it to our server and try to create a new Sql Table. i found this error. pls help me!

查看:59
本文介绍了当我将它连接到我们的服务器并尝试创建一个新的Sql表时,我的c#有问题。我发现了这个错误。请帮助我!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

登录失败。登录来自不受信任的域,不能与Windows身份验证一起使用。

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

推荐答案

错误消息非常明确 - 您登录SQL失败,因为SQL服务器不喜欢您的Windows授权。请改用显式的SQL用户名和密码。



尝试使用Server Explorer窗格在VS中建立连接:

1)Open Server资源管理器。

2)右键单击数据连接并选择添加连接

3)在随后的对话框中,选择您的DataSource和数据库,指定安全性信息,然后按测试连接按钮。

4)连接工作时,按确定

5)在服务器资源管理器窗格中突出显示数据库,查看属性窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。
The error message is pretty explicit - your log in to SQL failed, because the SQL server does not like your Windows authorization. Use an explicit SQL username and password instead.

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.


发布您的连接字符串代码
post your connectionstring code


这篇关于当我将它连接到我们的服务器并尝试创建一个新的Sql表时,我的c#有问题。我发现了这个错误。请帮助我!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆