NHibernate 配置连接到 Visual FoxPro 8.0?
好奇是否有人曾经将 NHibernate 连接到 Visual Foxpro 8.0?我希望连接到遗留数据存储,并且更愿意使用 NHibernate,而不是必须手动编码所有 ADO.Net。
如果有人有 FoxPro 8 连接的配置 XML 文件示例,那就太棒了!
Curious if anyone out there has ever connected NHibernate to Visual Foxpro 8.0? I'm looking to hook into a legacy data store, and would prefer to use NHibernate vs. having to hand-code all of the ADO.Net.
If anyone has an example of the configuration XML file for a FoxPro 8 connection that would be great!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
并找到了解决方案:
首先,我需要获取 Visual FoxPro 驱动程序(这些是 9.0,但允许我在 8.0 中工作)。
接下来,我必须按如下方式设置 NHibernate 配置。在这个项目中,我是基于目录的,因此我有一个名为 C:\Temp\VisualFox\ 的目录,其中包含我的所有 *.dbf 文件。
而现在,世界一切都好!
And figured out the solution:
First, I needed to pick up the Visual FoxPro drivers (these are 9.0 but allowed me to work in 8.0).
Next, I had to set up my NHibernate config as follows. In this project I'm directory based, so I have a directory called C:\Temp\VisualFox\ that contains all of my *.dbf files.
And now, all is well in the world!
我没有完整的 XML 示例,但使用
OleDbDriver
和GenericDialect
应该可以帮助您入门。I don't have a full XML example, but using the
OleDbDriver
along withGenericDialect
should get you started.这是我的解决方案:
和配置图:
Here is my solution:
and Config maps: