如何连接远程SQL或使用IP地址 [英] how to connect Remote sql or using ip address
问题描述
这是洛克什
我的问题是为此我开发了一个网站"groups.aspx",我为此创建了一个登录页面以允许输入用户名和密码,
我在同一台计算机上使用了sqlserver 2008,其工作正常
添加name ="sqlcon" connectionString ="server = KIRAN-EBF343820 \ SQLEXPRESS; user id = sa; password = abc; database = @ MobileTrack"
hi
在浏览器中我搜索(( http://localhost/TrackingBefore/Login.aspx [ < a href =" ">< ; /a > [< a href =" 目标 =" 标题 =" > ^ < /a > ]
它访问正常,但sql server在该动作中未连接
我这样更改了连接字符串
添加名称="sqlcon" connectionString ="server = 49.204.58.114,KIRAN-EBF343820 \ SQLEXPRESS; user id = sa; password = abc; database = @ MobileTrack"
任何人都无法解决该问题,请帮助我有关正确的连接字符串,请参阅http://www.connectionstrings.com/sql-server-2008 [ ConnectionString = "
我在我的项目中遇到了这个问题,我添加了 Integrated Security = no ,它将解决我的问题.
希望对您有所帮助.
谢谢.
hii dud首先,您需要启用sql服务器以进行远程访问
为此,请参考
http: //blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx [ http://mushtaqnaik.blogspot.in/2010/12/how-to-enable-remote-connection-on-sql.html [ connectionString = "
会很好的
编码愉快
this is lokesh
my problem is i developed one website "groups.aspx" for this i created one login page for that to allow to enter username and password and
i used sqlserver 2008 in same computer its working fine add name="sqlcon" connectionString="server=KIRAN-EBF343820\SQLEXPRESS;user id=sa;password=abc;database=@MobileTrack"
in browser i searching like (http://localhost/TrackingBefore/Login.aspx[^]
but the main task is
i want to access my website in remote computer that is like
<a href="http://localhost/TrackingBefore/Login.aspx">http://49.204.58.114/TrackingBefore/Login.aspx</a>[<a href="http://localhost/TrackingBefore/Login.aspx" target="_blank" title="New Window">^</a>]
it accessing fine but sql server is not connection in that movement
i changed the connection string like this
add name="sqlcon" connectionString="server=49.204.58.114,KIRAN-EBF343820\SQLEXPRESS;user id=sa;password=abc;database=@MobileTrack"
its not working how to solve this task any one please help to meFor proper connection strings, please refer to http://www.connectionstrings.com/sql-server-2008[^].
If the connection string is correct, you need to check that proper protocol (typically TCP/IP) is enabled and that there is no firewall blocking the conversation to the database and that the SQL Server is up and running.Try this connection string
ConnectionString="Data Source=49.204.58.114;Initial Catalog=MobileTrack;User ID=sa;Password=abc;Integrated Security=no;"
I am facing this problem in my project and i added Integrared Security=no then it will be solved my problems.
I hope it will be help you.
Thnak You.
hii dude first you need to enable your sql server for remote access
for this refer
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx[^]
or
http://mushtaqnaik.blogspot.in/2010/12/how-to-enable-remote-connection-on-sql.html[^]
and then use following
connection string
connectionString="Data Source=49.204.58.114;Initial Catalog=MobileTrack;User ID=sa;Password=abc"
it will work fine
have happy coding
这篇关于如何连接远程SQL或使用IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!