连接网络sqlserver的问题 [英] Problem to connect network sqlserver

查看:67
本文介绍了连接网络sqlserver的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经问过这个问题了,但是现在我仍然无法连接到网络sql服务器



我给出以下编码并检查它。但它没有连接



I am already asked this question, but still now i cannot connected to network sql server

I give the following coding and check it. But it is not connected

' Public con As New SqlConnection("Data Source=SQLSERVER\SQLEXPRESS;Initial Catalog=phoneix;Integrated Security=True")
   'Public con As New SqlConnection("Server=SQLSERVER\\SQLEXPRESS,10000;SSPI=True;Initial Catalog=phoneix;User Id=sa;Password=welcome")
   'Public con As New SqlConnection("Integrated Security=SSPI;Initial Catalog=phoneix;Data Source=SQLSERVER\SQLPRESS;User Id=sa;Password=welcome")
   Public con As New SqlConnection("Data Source=192.170.1.53,1433;Network=TCP/IP;Initial Catalog=phoneix;Integrated Security=SSPI;user Id=sa;Password=welcome")
   ' Public con As New SqlConnection("Data Source=192.170.1.53,1433;Network=TCP/IP;Initial Catalog=phoneix;User Id=sa;Password=welcome;Trusted Connection=False")





我检查服务器是否在远程连接上。

但是服务器没有连接。将发生以下错误:

WindowsApplication1.Module1的类型初始化程序引发异常。



是否对sql server做了任何更改,请有人为此帮助我解决方案

请帮助任何人帮助解决这个问题



提前致谢



And i have check the server is on the remote connections.
But the server is not connected. The following error will occured,
The type initializer for 'WindowsApplication1.Module1' threw an exception.

Is there any change made to sql server,Please anybody have solution for this help me
Please help anybody help for this problem

Thanks in advance

推荐答案

尝试以下步骤,看看是否有任何错误信息

open visual studio

- >服务器浏览器

- >添加连接

- >新连接

- >更改为sql server

- >提供服务器名称92.170.1.53

- >测试连接并查看是否发生任何错误共享该错误



其他



成功连接后

右键单击服务器explorere数据库连接 - >属性



见连接字符串

复制它并使用.......





希望它会有所帮助。
Try these steps and see if any error message occurs
open visual studio
->Server explorer
->Add connection
->new connection
->change to sql server
->Provide server name 92.170.1.53
->Test connection and see if any error occurs share that error

else

after successfull connection
right click on server explorere database connection ->properties

see Connection String
copy it and use.......


hope it will helps.


亲爱的devausha,



检查你的连接字符串

http://www.connectionstrings.com/sql-server-2005 [ ^ ]



谢谢
Dear devausha,

Check your connection string with
http://www.connectionstrings.com/sql-server-2005[^]

Thanks


您的连接字符串应为:

Your connect string should be :
Public con As New SqlConnection("Data Source=192.170.1.53;Initial Catalog=phoneix;Integrated Security=SSPI;")


这篇关于连接网络sqlserver的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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