DBF文件表结构在SQL Server中创建表
我正在尝试将 DBF 文件迁移到 MS SQL Server 2008。从 SQL Server 导入和导出向导导入文件时。我无法导入文件。我已经创建了连接。但是当我尝试编辑映射/预览表格时它显示错误 “外部表不是预期的格式”
任何帮助将不胜感激。
I am trying to migrate DBF files to MS SQL Server 2008. While importing files from SQL Server Import And Export Wizard. I am unable to import the files. I have created the connection. But when I try to Edit Mappings/ Preview the table It shows error
"External table is not in expected format"
Anyhelp would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您无法使向导工作,则必须使用链接服务器或 OPENROWSET 编写自己的代码。如果您是 SQL Server 新手,那么链接服务器和 OPENROWSET 是您最后需要了解的事情。
很久以前,我在 Foxpro 中编写了从 SQL Server 表读取数据并向其写入数据的驱动程序。这可能是 SQL Server 7.0,而我可能使用的是 OLE DB。如果 SQL 无法与 Foxpro 对话(这不会让我感到惊讶),您可能需要让 Foxpro 与 SQL 对话。
如果做不到这一点,从 Foxpro 转储到某种形式的文本分隔文件,然后导入它们将起作用,尽管这需要更多的努力。
If you can't get the wizard to work, you'd have to write your own code, using linked servers or OPENROWSET. If you are new to SQL Server, linked servers and OPENROWSET are about the last thing you want to have to figure out.
Once upon a time long long ago, I wrote drivers in Foxpro that read data from and wrote data to SQL Server tables. This would have been SQL Server 7.0, and I was probably using OLE DB. If SQL can't talk to Foxpro (which wouldn't surprise me), you may need to get Foxpro to talk to SQL.
Failing that, dumping from Foxpro to some form of text delimited file and then importing them will work, though it'd take more effort.
我建议使用 SQL Bulk XML Load 将数据从 DBF 表移动到 MS SQL Server。 Doug Hennig 在此处编写了一篇博客文章,其中包含示例代码。
I would recommend using SQL Bulk XML Load to move data from DBF tables to MS SQL Server. Doug Hennig wrote a blog post here with sample code.