简体   繁体   English

将信息从MS Access数据库传输到MySQL数据库

[英]Transferring info from MS Access db to MySQL db

I am making a program to audit some of our workers. 我正在制定一个程序来审核我们的一些工人。 I need some help figuring out how to do this next process. 我需要一些帮助来弄清楚下一步如何做。

I have a MS Access database that I am pulling information from. 我有一个要从中获取信息的MS Access数据库。 This information is being stored in a dictionary of <string, UserClass>. 此信息存储在<string, UserClass>.的词典中<string, UserClass>. The string is the user's name and the UserClass contains a list of "ControlNumbers" that are assigned to that particular user. 该字符串是用户的名称,并且UserClass包含分配给该特定用户的“ ControlNumbers”列表。 So user "jsmith" would have controlNumber = "123456" assigned to him. 因此,用户“ jsmith”将具有分配给他的controlNumber =“ 123456”。

I then want to use this controlNumber to fill in a blank database specifically made for audits. 然后,我想使用此controlNumber填充专门用于审核的空白数据库。 So in this new Audit Database, I have a table called 'Events'. 因此,在这个新的审核数据库中,我有一个名为“事件”的表。 This table contains many columns, but has a column named "controlNumbers"...so what I want to do is >> update this Audit Databse with all the information from the MS Access database based on the controlNumber that I have. 该表包含许多列,但是有一列名为“ controlNumbers” ...所以我要做的是>>使用基于我拥有的controlNumber的MS Access数据库中的所有信息来更新此审核数据库。

I am just curious about the logic of doing this right now. 我只是对现在这样做的逻辑感到好奇。 Should this be one function or multiple? 这应该是一个功能还是多个功能? and if multiple, what function does each sub have? 如果有多个,每个子模块具有什么功能?

I was thinking about saving all the information for each table from the Access database into a dataadapter and then trying to route the dataadapter to the MySQL database. 我当时正在考虑将Access数据库中每个表的所有信息保存到dataadapter中,然后尝试将dataadapter路由到MySQL数据库。 Is this possible? 这可能吗?

Hint: all of the tables, columns, and fields are named the same in both databases. 提示:在两个数据库中,所有表,列和字段的名称都相同。

So if I understand you correctly, you have a database in MS ACCESS and you want to import the data from that to MySQL? 因此,如果我对您的理解正确,那么您在MS ACCESS中有一个数据库,并且想将数据从数据库导入MySQL吗?

If so, you can try to export from access to any ODBC database using the Export functionality in MS ACCESS. 如果是这样,则可以尝试使用MS ACCESS中的“导出”功能从对任何ODBC数据库的访问中导出。

If that somehow isn't working for you, try Access To MySQL . 如果那不适合您,请尝试访问MySQL

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

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