如何在不安装Sql Server的情况下连接Sql数据库? [英] How to Connect Sql Database without Installing Sql Server?

查看:527
本文介绍了如何在不安装Sql Server的情况下连接Sql数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Sql Server数据库作为项目后端,VB.Net 2012作为前端。现在我们要将此项目部署到客户端。但我们不想在客户端安装Sql server。那么如何在不安装Sql Server的情况下访问Sql Server数据库。我们正在将Visual Basic 2012用于我们的项目Fornt End。

解决方案

假设您正在使用连接字符串 [ ^ ]连接数据库只需修改指向您的SQL Server。



Sql Server连接字符串示例 [ ^ ]



对于可信连接

 Server = myServerAddress; Database = myDataBase; Trusted_Connection = True; 


你不能。



SQL Server是一个基于服务器的系统,你需要有一个可用的实例才能使用SQL数据库 - 单独的文件是不够的。



如果你使用你的数据库单个用户(并且根本不与任何其他用户共享数据)然后您可以更改您的代码以使用单个用户数据库文件,这不需要SQL服务器,如SqlCE或SqLite甚至Access,但任何多用户活动确实需要一个基于服务器的系统,如Sql Server或MySql。



你可以只复制一个文件,让它作为SQL数据库,为没有SQL服务器的多个用户工作

We are using Sql Server database as our project back end and VB.Net 2012 as Front End. Now we want to deploy this project to client side. But we dont want to install Sql server at client side. So how can we access Sql Server database without Installing Sql Server. We are using Visual basic 2012 for Our Project Fornt End.

解决方案

Assuming that you are using a connection string[^] to connect the database just amend that to point towards your SQL Server.

Sql Server Connection String Examples[^]

For a trusted connection

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;


You can't.

SQL Server is a server based system, and you need to have an instance of it available in order to use an SQL database - the file alone is not sufficient.

If you are using your DB for a single user (and not sharing the data with any other users at all) then you could change your code to use a single user database file which would not require SQL server such as SqlCE or SqLite or even Access, but any multi user activity really needs a server based system such as Sql Server or MySql.

You can;t just copy a file over and have it work as an SQL database for multiple users without SQL server.


这篇关于如何在不安装Sql Server的情况下连接Sql数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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