关于SQL服务器问题 [英] About SQL server issue

查看:72
本文介绍了关于SQL服务器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿嘿伙计们! 

嗯,我必须制作一个vb应用程序,因为我需要 一些东西。我将应用程序连接到SQL服务器数据库,该数据库允许我从 获取数据。这里的问题是 ,我希望在其他计算机上安装。我的数据库本地的,那么我可以做什么?你有任何想法吗?

谢谢,祝你有个美好的一天!





我的尝试:



我尝试使用visual studio中的选项使用本地数据库但是我在创建SQL服务器数据库文件时遇到了一些问题。

解决方案

如果你想要一个本地数据库,它只会由一个用户使用(即你不需要多个用户同时访问和更改数据)那么你就不要需要SQL Server数据库 - 您可以使用Access或SqLite,并且在安装.NET并安装应用程序后,它们几乎不需要额外安装。您必须更改应用程序以使用OleDbConnection,OleDbCommand(或SQLiteConnection,SQLiteCommand)对象而不是SqlConnection和SqlCommand等,但这通常是一项相当简单的任务。



如果确实需要多用户访问,则需要在网络上安装SQL Server并将其提供给运行应用程序的所有计算机 - 每个组用户在一台PC上,并且需要一个适当的连接字符串才能访问服务器。



您不能直接使用SQL数据库文件:您必须通过SQL服务器,这需要完全安装(这不是一项简单的工作!)

Hey hey guys!

Well, I had to make a vb app because I need it for some things. I connected the application to an SQL server database which allows me to get data from there. The problem here is that I want it to be installed in other computers. My database is local so what can I do? Do you have any ideia? 

Thanks and have a good day!



What I have tried:

I tried to use a local database using the option from visual studio but I am having some problems creating SQL server database file.

解决方案

If you want a "local database" and it's only going to be used by a single user (i.e. you don't need multiple users accessing and altering the data at the same time) then you don't need an SQL Server database - you can use Access or SqLite instead, and they require little or no extra installation after .NET and your app is installed. You would have to change your application to use OleDbConnection, OleDbCommand (or SQLiteConnection, SQLiteCommand) objects instead of SqlConnection and SqlCommand and so forth, but that's normally a fairly trivial task.

If you do need multiuser access, then SQL Server needs to be installed and available on the network to all computers that run your application - on one PC per "group" of users, and they will need an appropriate connection string to access the server.

You can't "use an SQL database file" directly: you must go via SQL server, which requires full installation (and that is not a trivial job!)


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

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