连接到多个客户端的1个数据库 [英] connect to 1 database with several client

查看:133
本文介绍了连接到多个客户端的1个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我正在使用此代码连接到数据库:



Hi
I''m using this code to connect to the database:

sqlconnection con= new sql connection ("...........")
sql command cm = new sql command ("SELECT OR INSERT",con)



但当两个系统工作时一起是一个连接错误系统



当两个系统连接在一起时我该怎么办,问题可能不一样



此软件可能首先安装在多个系统上。


But when the two systems to work together was a connection error system

What do I do when the connection of the two systems together, the problem might not be

This software may be installed on multiple systems first.

推荐答案

您的连接字符串应该在配置文件中,因此您不需要重新编译以改变它。连接到数据库的多个实例不应该有任何问题,只要SQL服务器配置为接受多个连接即可。如果您使用的是SQL Server Express,它只允许一个连接,您需要购买更好的版本。还有其他免费数据库没有这个限制。



在这里发布有关错误消息的帖子时,请发布它的实际文本。这样任何人都可以回答你,即使他们不知道答案(如果你谷歌的错误信息,你总能找到答案)。如果没有错误消息,我们不知道您的问题是什么,该消息以简单的英语解释您的问题,并且您刚刚告诉我们存在连接错误。
Your connection string should be in a config file so you don''t need to recompile to change it. You should not have any issue with multiple instances connecting to the DB, so long as SQL server is configured to accept that many connections. If you''re using SQL Server Express, it only allows one connection and you need to buy a better version. There are other free databases that do not have this limitation.

When posting here about an error message, post it''s actual text. That way anyone can answer you, even if they don''t know the answer ( if you google the error message, you''ll always find the answer ). Without the error message, we have no idea what your problem is, the message explains your problem in plain English and you''ve just told us that there ''was a connection error''.


这篇关于连接到多个客户端的1个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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