Borland Delphi 7 - Windows 7 问题
多个 Borland Delphi 7 应用程序在 Windows 7 PC 上执行时出现问题。
在 XP PC 上运行但不在 7 PC 上运行的一个进程会删除一个文件并移动一个文件。
该过程使用以下命令:
SysUtils.DeleteFile(FileName)
或
IdGlobal.CopyFileTo(FilePathandNameCurrent, FilePathandNameNew)
这是错误消息:
[DBNETLIB][连接写入 (send()).]一般网络错误。查看 您的网络文档
CopyFileTo 功能将文件从用户 PC 移动到网络文件夹。用户有权访问该文件夹。
我认为这些功能与 7 不兼容。有人可以确认吗?如果不用 C# 重新编写这些应用程序,在 7 PC 上运行 XP 模式是唯一的解决方案吗?
Several Borland Delphi 7 applications are having problems when executed on a Windows 7 PC.
One process that is working on a XP PC that is not working on a 7 PC deletes a file and moves a file.
The process uses these commands:
SysUtils.DeleteFile(FileName)
or
IdGlobal.CopyFileTo(FilePathandNameCurrent, FilePathandNameNew)
Here is the error message:
[DBNETLIB][ConnectionWrite
(send()).]General network error. Check
your network documentation
The CopyFileTo function moves a file from the user PC to a network folder. The user has access to this folder.
I am thinking these functions are not compatible with 7. Can anyone confirm? Without re-writing these applications in C#, is running XP mode on the 7 PC the only solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您提供的错误消息与复制或删除文件无关,因此我怀疑您的问题与您提到的功能无关。如果我没记错的话,DbNetLib 是一种连接 SQL Server 或其他数据库的方法。
显然应用程序无法访问 SQL Server(或其他一些数据库)实例。连接字符串可能不正确,或者网络连接被中断,或者您的防火墙规则阻止连接。
The error message you provide has nothing to do with copying or deleting a file, so I suspect your issue isn't with the functions you mention. DbNetLib is, if I recall correctly, a means for connecting to SQL Server or other databases.
Apparently the application cannot reach a SQL Server (or some other database) instance. Perhaps the connection string is incorrect, or the network connection was interrupted, or you have a firewall rule preventing connectivity.
Windows 7 与 Windows XP 不同... 第一个区别是 Windows 7 的提升管理员权限默认情况下无法访问(即使您以管理员身份登录)。
让我们检查一下这是否是您的问题...
要在管理员模式下运行您的应用程序,请右键单击 exe 并选择以管理员身份运行...如果它不起作用(即您收到相同的错误消息),那么我们将在错误的轨道上...但如果确实如此,那么您需要的是将清单文件包含到您的项目中。这将允许您的程序每次都以管理员身份运行,而无需右键单击。
从这里开始 http://delphi.about.com/library/bluc/text/uc111601a .htm
Windows 7 is different to Windows XP... 1 difference is Windows 7's elevated administrator privileges which are not accessed by default (even if you log in as the administrator).
Let's check if that's your issue...
To run your application in administrator mode, right-click the exe and choose Run as Administrator... if it doesn't work (ie. you get the same error message) then we're on the wrong track... but if it does, then what you need is to include a manifest file into your project. This will allow your program to run as administrator everytime without right-click.
start here http://delphi.about.com/library/bluc/text/uc111601a.htm