LoadfromText给出错误2285(如Microsoft Office Access不能创建输出文件)错误、文件、LoadfromText、Access

2023-09-08 11:08:34 作者:鸽屿

当使用loadfromtext在获得进口的形式,我不断地得到一个运行时错误2285搜索互联网显示许多人以同样的问题,还没有解决方案。有谁知道是什么原因导致这个错误?

When importing forms in access using loadfromtext, I continually get a runtime error 2285. Searching the internet shows many people with the same problem, yet no solutions. Does anyone know what causes this bug?

编辑: 另外一个名为ERRORS.TXT文件,其中包含数据库的文件夹中生成。

In addition a file called 'errors.txt' is created in the folder containing the database.

编辑:解排序: 我从来没有得到周围问我关于修补程序系统操作员,但功能没有按预期在家里。我记录在今天上午和它的作品在这里(的平均时间没有改变到MS Access)。我猜这是在MS Access内部的错误,而不是在VBA code。

Sort of solution: I never got around to asking my system operator about the hotfixes, but the function did work as expected at home. I logged in this morning and it works here to (no changes to ms access in the mean time). I'm guessing this is an internal bug in ms access, not in the vba code.

如果您遇到同样的错误,尝试冷启动,等待一段时间,希望你的问题消失。如果你能列出具体何种情况下错误可能发生的错误最终会被发现。

If you experience the same error, try a cold reboot, wait a while and hopefully you the problem goes away. If you could list the specific circumstances under which the error occured maybe the bug can eventually be found.

最后,在相关的新闻:在 http://www.mvps.org/access/模块/ mdl0045.htm 访问插件可以发现导出表单/表。这其中已经verfied工作,这样你就可以检查问题出在你自己的code或有些出入问题。

Finally in related news: At http://www.mvps.org/access/modules/mdl0045.htm an access addin can be found to export your forms/tables. This one has been verfied to work, so you can check if the problem is in your own code or some access bug.

P.S。感谢Remou您的耐心和帮助。我upvoted修复答案,因为它似乎是最接近最终的解决方案。

P.S. Thanks Remou for your patience and help. I've upvoted the hotfix answer because it seems to be closest to the eventual solution.

我的版本是Office Access 2003中(11.8166.8221)SP3

My version is Office Access 2003(11.8166.8221) SP3

是的我使用了一个新的数据库。我试图建立一个系统,如果你把所有形式的定义为文本文件,使他们可以版本控制,并且有一个基于这些文字再presentations'编'一个干净的数据库。

Yep I'm using a new database. I'm trying to set up a system where you have all form definitions as text files so that they can be version controlled, and that there is a clean database that is 'compiled' based on these text representations.

在code我使用的是一个基本的

the code I'm using is a basic

Application.LoadFromText acForms, left(filename, len(filename)-len(".frm.txt")), filename

我已经检查(通过使用F8的code步进),该窗体名称是正确的文件名是正确的,包括DRIVENAME

I have checked (by stepping through the code using F8) that the formname is correct and the filename is correct and including the drivename

推荐答案

此问题与错误存在的对C控制集成访问源$ C ​​$的用户。

This problem is related to errors occuring for users of the Access Source Code Control Integration.

该解决方案可以在这里找到: http://support.microsoft.com/kb/927680 如果Access默认的文件类型不同于文件类型的Access数据库在Visual SourceSafe项目出现此问题。

The solution can be found here: http://support.microsoft.com/kb/927680 "This issue occurs if the Access default file type differs from the file type for the Access database that is in the Visual SourceSafe project."

在换句话说: 中找到的默认文件类型 - >选项 - 工具>高级 - >默认文件格式是您在使用LoadFromText数据库的文件格式不同,或从数据库中,你使用SaveAsText上。该数据库的文件格式可以在Access标题栏中找到。

In other words: The default file type found in "Tools -> Options -> Advanced -> Default file format" is different from the file format of the database you are using LoadFromText on, or from the database you used SaveAsText on. The file format of the database can be found in the Access title bar.

 
精彩推荐
图片推荐