连接虚拟网络sql server [英] Connect virtual network sql server

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

问题描述


请有人帮助我,我想使用vb.net连接虚拟网络sql server


我可以连接通过ODBC(服务器:ip / databasename)

解决方案



连接到SQL Server的最佳方法是*不是*使用ODBC,您应该使用OleDb,特别是在System.Data.SqlClient命名空间中找到的类,例如SqlConnection,SqlCommand等。


您的连接字符串将是某种东西像这样:


" server = theIP; uid = yourid; pwd = yourpassword; database = yourdatabasename"


看看我的博文(
https:// geek- goddess-bonnie.blogspot.com/2015/02/easy-peasy-connection-strings.html
)可以轻松找到您的特定设置的连接字符串。


Hi,

Please anyone help me, i want to connect virtual network sql server using vb.net

I can connect via ODBC (server: ip/databasename)

解决方案


The best way to connect to SQL Server is *not* with ODBC, you should be using OleDb, specifically the classes found in the System.Data.SqlClient namespace, such as SqlConnection, SqlCommand, etc.

Your connection string would be something like this:

"server=theIP;uid=yourid;pwd=yourpassword;database=yourdatabasename"

Take a look at my blog post ( https://geek-goddess-bonnie.blogspot.com/2015/02/easy-peasy-connection-strings.html ) for an easy way to find what your connection string would be for your particular setup.


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

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