我收到无效的 FPT 错误,但文件在那里
在运行将所有文件从 FoxPro 移动到 SSMS Dbs 的 SSIS 项目时,我收到此错误。相应的 DBF 文件在 FoxPro 上可以正常打开,备忘录字段(知识的 FPT 文件)也可以正常工作,所以我不知道解决方案是什么,我尝试对备忘录进行一些更改,看看是否会更新文件但这没有用。我厌倦了重新索引 DBF,但也没有运气。我如何生成新的 FPT 文件以便运行该项目。怎么可能无效呢。网上没有对此的支持。
Im getting this error when running an SSIS project that moves all of our files from FoxPro into SSMS Dbs. The corresponding DBF file opens fine on FoxPro and the memo field which is the FPT file to knowledge works fine too, So I don't what the solution is, I tried making a little changes to the memos to see if that would update the file but that didnt work. I tired re indexing the DBF but no luck there either. How can i generate a new FPT file so I can run this project. How could it be invalid. There is no support online for this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用第三方 .NET 工具 (RatSql.DbfReader)。从异常消息来看,这个工具是用.NET语言编写的。它不是 Microsoft 产品,也不是 Visual FoxPro 的一部分。
DBF 文件是一系列相似但有细微差别的格式。许多声称支持 DBF 文件的工具仅支持某些产品创建的 DBF 文件,例如 VFP 6、FP 2.6、dBase 或 Clipper。
我为您看到的选项:
如果这是内部开发的产品,您需要与原始开发人员联系。
由于您有 Visual FoxPro,因此可以使用以下命令将文件转换为旧版本:
使用表
复制到新表类型 FOX2X
将 table 替换为 DBF 文件的路径和名称,将 newTable 替换为新文件的路径和名称。然后使用新文件进行导入。不能保证这有效,但旧的 FoxPro 2.x 格式更有可能受到第三方库的支持。
如果这是一个重复的过程,您可以将这些命令编译成 EXE 文件,并将调用 EXE 合并到导入过程中。
将 .NET 组件替换为 Visual FoxPro ODBC 驱动程序或 OLEDB 提供程序。 ODBC 驱动程序不支持 VFP 6 之后引入的功能,但在大多数情况下应该可以工作。两者都仅作为 32 位驱动程序提供,这可能需要您使用 32 位工具连接到 DBF 文件。
这实际上可能是一个或多个记录的问题,其中指向备注字段的指针是错误的。您可以使用 Visual FoxPro 找到它。在 Visual FoxPro 中打开 DBF 文件,然后打开浏览窗口。您可以在菜单中或通过执行 USE 和 BROWSE 命令以交互方式执行此操作。
然后双击“备忘录”或“备忘录”列。如果有多列,则需要对每一列重复以下步骤。现在单击浏览窗口的标题栏并按住向下箭头键。 Visual FoxPro 应该开始滚动表格并显示每条记录。如果备注字段中有错误,您将收到错误消息。
或者,您可以编写一个 FoxPro 程序,该程序使用 SCAN...ENDSCAN 循环,并使用 =memofieldname 访问每个备注字段(如果表中的行太多而无法以交互方式执行此操作)。
You are using a third party .NET tool (RatSql.DbfReader). Judging from the exception message this tool was written in a .NET language. It's not a Microsoft product and not part of Visual FoxPro.
DBF files are a family of formats that are similar but have subtle differences. Many tools that claim to support DBF files, will only support DBF files created by certain products, such as VFP 6, FP 2.6, dBase or Clipper.
The options I see for you:
If this is an in-house developed product you need to get into touch with the original developers.
Since you have Visual FoxPro, you can convert the file to an older version using the following commands:
USE table
COPY TO newTable TYPE FOX2X
replace table with the path and name of the DBF file, and newTable with the path and name of a new file. Then use the new file for your import. There's no guarantee this works, but the old FoxPro 2.x format is more likely to be supported by third party libraries.
If this is a repeated process, you can compile these commands into an EXE file and incorporate calling the EXE into your import process.
Replace the .NET component with the Visual FoxPro ODBC driver or OLEDB provider. The ODBC driver does not support features introduced after VFP 6, but should work in most cases. Both are only available as 32-bit drivers which might require you to use 32-bit tools to connect to the DBF file.
It might actually be a problem with one ore more records where the pointer to the memo field is wrong. You can find this with Visual FoxPro. Open the DBF file in Visual FoxPro and then open a Browse window. You can do this interactively in the menu or by executing USE and BROWSE commands.
Then double click the column saying "memo" or "Memo". If there are multiple columns, you need to repeat the following step for every column. Now click on the BROWSE window's title bar and hold down the down arrow key. Visual FoxPro should begin scrolling through the table and displaying every record. If there is an error in the memo field, you will get an error message.
Alternatively you can write a FoxPro program that uses a SCAN...ENDSCAN loop and accesses every memo field with =memofieldname if there are too many rows in the table to do this interactively.