简体   繁体   English

如何在不同计算机上的2个软件之间传输数据

[英]How transfer data between 2 software in different computers

I am developing two Csharp programs and I need to transfer data of multiple tables in a program to another one which could be in a different computer with no internet connection. 我正在开发两个Csharp程序,我需要将一个程序中多个表的数据传输到另一个表,该数据可能位于没有互联网连接的另一台计算机中。

What is the best method for transferring data? 传输数据的最佳方法是什么?

EDIT (from comments): 编辑(从评论):

the computers does not have internet connection, but usb-flash-drive, network, etc. are still available – 电脑没有互联网连接,但USB闪存驱动器,网络等仍然可用–

If you dont have an internetconnection, i would Seriealize data to xml and move it on a usb-flash-drive. 如果您没有Internet连接,我会将数据串行化为xml并将其移动到USB闪存驱动器上。

One way of doing it using annotated classes. 使用带注释的类的一种方法

You can use sockets for exchanging data between programs in same computers as well as programs in different computers. 您可以使用套接字在同一台计算机上的程序以及不同计算机上的程序之间交换数据。 For that you need to create socket program's ( a message passing infrastructure). 为此,您需要创建套接字程序(消息传递基础结构)。

If you are too lazy you can use the open source message passing implementations like 如果您太懒了,可以使用开源消息传递实现,例如

http://www.rabbitmq.com/ ( A popular one) http://www.rabbitmq.com/ (一个受欢迎的)

For details go through 有关详细信息,请通过

http://en.wikipedia.org/wiki/Message_queue http://en.wikipedia.org/wiki/Message_queue

如果是真正的 ,最简单的方法是将数据插入SQlite数据库中,然后简单地传输文件(通过netweork,USB-Stick,Punchcard,键入十六进制等等)

If you have a printer and a scanner you could print the table from one computer and scan in on the other. 如果您有打印机和扫描仪,则可以从一台计算机上打印表格,然后在另一台计算机上扫描。 This will require you to have have an OCR algo to recognize the text from an image. 这将要求您具有OCR算法才能识别图像中的文本。 Another optimization you could apply on this is that you could actually place a monitor from the first computer onto the scanner directly and scan the content of the monitor. 您可以应用的另一种优化方法是,您实际上可以将第一台计算机上的监视器直接放在扫描仪上,然后扫描监视器的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM