FoxPro-> MySQL
我正在为使用 FoxPro 桌面数据库系统的客户构建一个网站。
数据库和网站之间应该共享的数据本质上是成员列表(相当扁平的结构:他们的联系方式、一些标志字段等)
他们希望对这些成员详细信息所做的任何更改都能通过以下方式自动同步到网站(mysql数据库)。它不需要完全即时,但过程需要简单。
我的问题是这里可以使用的最简单的方法是什么?他们愿意做出一些妥协以节省开发时间/成本。
FoxPro 有没有一种简单的方法可以直接与我的在线 MySQL 数据库对话?
FoxPro 可以创建 XML 或 CSV 类型文件并将其传递给 Web 脚本吗? (然后我用它解析和更新MySQL)
任何建议表示赞赏。
I'm building a website for a client that uses a FoxPro desktop database system.
The data that should be shared between the database and website is essentially a list of members (fairly flat structure: their contact details, a few flag fields etc)
They'd like any changes that are made to these member details to be automatically synched through to the website (mysql database). It doesn't need to be totally instant but the process needs to be easy.
My question is what are the simplest approaches that could be used here? they are willing to compromise a bit to save development time/cost.
Is there an easy way for FoxPro could talk directly to my online MySQL database?
Could FoxPro create an XML or CSV type file and pass it to a web script? (which i then parse and update MySQL with)
Any suggestions appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以使用 Visual FoxPro 中的 ODBC 或 OLE DB。使用 ODBC 通常相当简单。
You could use either ODBC or OLE DB from Visual FoxPro. Using ODBC is typically fairly straightforward.
Foxpro 有一个内部函数 CURSORTOXML,它将获取一个表并将其转换为 XML
它在帮助文件中有相当详细的记录,但这里有一个简单的使用示例
希望这会有所帮助
Foxpro has an intrinsic function CURSORTOXML, which will take a table and convert it to XML
It is fairly well documented in the help files, but here is a simple example of its use
Hope this helps
试试这个:
这对我有用。
Try this:
This works for me.
从这里获取 odbc 驱动程序: https://dev.mysql.com/downloads/connector/ odbc/
您可能还需要 Microsoft Visual C++ 2010 Redistributable Package (x86) vcredist_x86.exe
使用此代码建立 mysql 连接
下面是一个向 mysql 表进行插入的示例。我用它来将用户操作记录到 mysql 中。
Get the odbc driver from here: https://dev.mysql.com/downloads/connector/odbc/
You may also need Microsoft Visual C++ 2010 Redistributable Package (x86) vcredist_x86.exe
Use this code to establish the mysql connection
Here's an example to do an insert into a mysql table. I use it for logging user actions into mysql.
您可以使用 XML 通过 HTTP REQUEST 向 Web 应用程序发送信息。
要在 FoxPro 中创建/读取 XML,可以使用 CURSORTOXML/XMLTOCURSOR。
在您的 Web 应用程序中,您可以创建 Web 服务来接收/发送 XML 数据。
如果您想要其他数据类型,可以使用 JSON 数据。使用 QDFOXJSON https://qdfoxjson.codeplex.com/
You can use XML for sending information to web application by HTTP REQUEST.
to create/read XML in foxpro, you can use CURSORTOXML/XMLTOCURSOR.
In your web application, you can create a web service to receive/send XML data.
If you want another data type, you can use JSON data. Use QDFOXJSON https://qdfoxjson.codeplex.com/
我想说你最快/最简单的选择可能是通过夜间脚本执行以下操作:
但从长远来看,您最好完全放弃 FoxPro初始导入;)
I'd say your quickest/easiest bet is probably to do the following via a nightly script:
In the long run though, you're probably better off totally ditching FoxPro after the initial import ;)