如何同时从两个或多个系统将数据插入我的数据库(sql)? [英] How can insert data into my database(sql) from two and more systems at the same time?

查看:165
本文介绍了如何同时从两个或多个系统将数据插入我的数据库(sql)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到从两个或多个系统向db插入数据的问题?请任何正文帮助我如何做到这一点?

I am having problem to insert data into db from two or more systems? please any body help me how can i do this?

推荐答案

如果您尝试从两个来源更新数据库(即使它不是同时发生的),您需要看看使用基于服务器的数据库系统 - 这意味着SQL服务器或MySql。如果你正在使用其中一个,那么它应该不是问题,除非你做的事情比较奇怪。



如果你使用的是SQL类型的数据库,比如直接使用SQLCE,SQLite或Access,然后尝试对多个用户执行任何操作都是一个非常糟糕的主意:它会导致大量问题。



所以你的问题可能是你使用单个用户数据库 - 在这种情况下更改为基于服务器的系统 - 或者问题与之无关多个用户,但直接在您的代码中,它只显示在生产中。其中最明显的是将字符串连接起来形成一个SQL语句,这使您对SQL注入开放,并且在开发过程中不会出现真实世界数据的问题。



无论如何,我们都需要错误信息和相关信息,以便有机会帮助您。
If you are trying to update a database from two sources (even if it is not simultaneous) you need to look at using a server based database system - which means SQL server or MySql. If you are using one of those, then it should not be a problem, unless you are doing something rather odd.

If you are using a SQL type database such as SQLCE, SQLite, or Access directly, then trying to do anything with more than one user is a very bad idea: it will cause loads of problems.

So your problem is either likely to be that you are using a single user database - in which case change to a server based system - or that the problem is unrelated to multiple users but in your code directly instead, and it only shows up in production. The most obvious of these is concatenating strings to form an SQL statement, which leave you open to SQL Injection, as well as giving problems with "real world" data that don't show up in development.

Whatever, we would need the error messages and related info to have any chance of helping you further.


这篇关于如何同时从两个或多个系统将数据插入我的数据库(sql)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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