如何使用Sql Server设置我在Vb.Net中构建的内容可以在其他PC中运行? [英] How Do I Set What I Build In Vb.Net Using Sql Server Can Be Run In Other Pc?

查看:62
本文介绍了如何使用Sql Server设置我在Vb.Net中构建的内容可以在其他PC中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是一个傻瓜问题。

重点是,我在vb.net和SQL服务器上构建一个应用程序作为我的dbase

我正在使用我自己的服务器,其名称为USER-PC,因此当我将.exe程序复制到其他PC时,由于dbase未在该PC中设置,因此无法运行,因此如何解决此问题。



任何帮助都会被贬值。

谢谢,



-Rudy

I do not know this is a fool question or not.
The point is, i build an app in vb.net and SQL server to be my dbase
I am using my own server which name USER-PC, so that when i copy the .exe program for running to other PC, it can not be run because the dbase not set in that PC, so how to solve this.

Any help will be apreciated.
Thanks,

-Rudy

推荐答案

连接到数据库时,通过连接字符串定义数据库位置。当计算机想要连接到SQL Server时,需要使用Server属性(远程或本地)定义SQL Server地址。如果可以使用DNS,IP地址等,则可以用计算机名称表示服务器位置。如果SQL Server实例是命名实例,则需要在服务器属性中指定实例名称。



有关示例,请查看 http://www.connectionstrings.com/sql-server/ [ ^ ]
When you connect to a database you define the database location via the connection string. When a computer wants to connect to SQL Server it needs to define the SQL Server address using the Server attribute, remote or local. The server location can be expressed with computer name if DNS can be used, IP address etc. Also if the SQL Server instance is a named instance, then the instance name needs to be specified in Server attribute.

For examples have a look at http://www.connectionstrings.com/sql-server/[^]


这篇关于如何使用Sql Server设置我在Vb.Net中构建的内容可以在其他PC中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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