Borland Delphi 7 - Windows 7 Problems
Several Borland Delphi 7 applications are having problems when executed on a Windows 7 PC.
One process that is working on a XP PC tha开发者_JS百科t 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?
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 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
精彩评论