在2种不同类型的数据库之间共享1个表
我遇到的问题是我想在两个不同的数据库之间同步一个表。 数据库 1 位于带有 MySQL 的 XP 服务器上 数据库 2 位于装有 Clarion 的 Novell 服务器上。
两个数据库之间是否可以共享一张表用户? 因此,当数据放入数据库 1 时,数据库会自动与数据库 2 同步。完成此操作后,表:两个数据库中的用户是否相同?
提前致谢!
The problem that I have is that I want to synchronize one table between two different databases.
Database 1 is on a XP server with MySQL
Database 2 is on a Novell server with Clarion.
Is it possible to share one table users between the two databases?
So when data is put in database 1, the database automatically synchornize with database 2. When this is done the table: user is in both databases the same?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Diederik,
您的问题不是很清楚,因为我们不知道您是否有权访问源代码或只能在数据库级别进行操作。
您没有明确提及是否使用 Clarion 来驱动这些数据库。我假设你是,因为你用它标记了你的帖子。
另外,您没有提及您在 Novell 服务器上使用的文件格式。我假设您正在使用 TopSpeed 文件格式 - 这里有一些有关 TopSpeed 文件格式的信息:大多数程序员认为它是 Clarion for Windows 的“本机”文件格式。它不是。 Windows 版 Clarion 没有本机文件格式之类的东西,而是采用完全驱动程序驱动的方法。 Clarion Professional Developer(DOS IDE)具有本机文件格式,即 Clarion .DAT 格式。 Clarion for Windows 可以使用提供驱动程序或 ODBC 驱动程序的任何文件格式,包括旧的 .DAT。
如果您可以访问源代码,那么情况就很简单了。在 Clarion 中,您可以轻松地让不同的缓冲区指向不同的表。
如果您无法访问源代码,则必须编写 MySQL 存储过程来更新远程文件。问题是,作为 TopSpeed 文件的远程文件将无法从 MySQL 服务器直接访问,因为 MySQL 服务器对此一无所知。
克服此问题的一种解决方案是在 MySQL 服务器上使用 TopSpeed ODBC 驱动程序,并让 MySQL SP 访问 ODBC 驱动程序。我认为 TopSpeed ODBC 驱动程序是必须的,因为它允许采取一种策略来避免这种情况,并促进更好的集成。
有关 MySQL SP 的详细信息超出了本文的范围,也是因为我不知道该级别的 MySQL SP。
问候
Diederik,
Your question isn't very clear in that we don't know if you have access to the source code or can only operate on a database level.
You didn't mention clearly if you're using Clarion to drive those databases. I'm assuming you are, since you tagged your post with it.
Also, you didn't mention which file format you're using at the Novell server. I'm assuming you are using the TopSpeed file format - here a bit of information about the TopSpeed file format: most programmers think it is the "native" file format for Clarion for Windows. It is not. Clarion for Windows doesn't have such thing as a native file format, but employs a totally driver driven approach. Clarion Professional Developer (a DOS IDE) had a native file format, which was the Clarion .DAT format. Clarion for Windows can use whatever file format that offers a driver or ODBC driver, including the old .DAT.
If you have access to the source code, then it is a pretty straight situation. In Clarion you can easily have different buffers pointing to different tables.
If you don't have access to source code, then you'll have to write a MySQL stored procedure to update the remote file. The problem is that the remote file, being a TopSpeed file, would bot be directly accessible from the MySQL server, since it, MySQL, doesn't know anything about it.
One solution to overcome this is by using the TopSpeed ODBC driver at the MySQL server, and having the MySQL SP access the ODBC driver. I consider the TopSpeed ODBC driver a must have, because it allows for a strategy to escape such situations, and promote a better integration.
Details on the MySQL SP are out of the scope of this post, also because I don't know MySQL SPs to that level.
Regards