Delphi XE Professional 中的 Quantum Grid 演示中的数据库错误
每当我在 Delphi XE Pro 中打开 Quantum Grid 演示之一(在 Windows 7 32-位),项目中的每个表(我认为)都会显示以下错误:
错误消息 http://www.tranglos.com/img/qgerror.png
该消息是:
Network initialization failed.
File or directory does not exist.
File: C:\PDOXUSRS.NET
Permission denied.
Directory: C:\.
我了解写入 c:\ 的权限问题,但结果是,虽然我可以构建并运行演示项目,没有显示任何数据,这使得演示毫无用处。那么在21世纪,什么样的数据库会将其配置写入c:\目录呢? :)(是的,我对 Paradox 数据库知之甚少,但我也不会使用它。我只是想学习如何使用网格。)
使用 BDE 管理员,我尝试更改 Paradox“NET DIR”值到C盘上有写权限的文件夹。结果:现在数据库表找不到它们的数据:
Path not found.
File: C:..\..\Data\GENRES.DB.
...并且无用的截断路径没有给出文件的预期位置。
有没有办法解决这个问题,以便演示可以正确加载示例数据?
Whenever I open one of the Quantum Grid demos in Delphi XE Pro (on Windows 7 32-bit), the following error is displayed for every table (I think) in the project:
error message http://www.tranglos.com/img/qgerror.png
The message is:
Network initialization failed.
File or directory does not exist.
File: C:\PDOXUSRS.NET
Permission denied.
Directory: C:\.
I understand permission issues writing to c:\, but the result is that while I can build and run the demo projects, no data is displayed, which makes the demos rather useless. And what kind of database writes its configuration to c:\ directory in the 21st century anyway? :) (Yes, I know very little about Paradox databases, but I won't ever be using one either. I just want to learn how to use the grid.)
Using BDE Administrator I've tried changing the Paradox "NET DIR" value to a folder with write permissions on the C drive. Result: now the database tables cannot find their data:
Path not found.
File: C:..\..\Data\GENRES.DB.
...and the unhelpfully truncated path gives no indication where the files are expected to be.
Is there a way to work around the problem so that the demos can load their sample data correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
评论(3)
我从我们自己的应用程序中知道此消息。这与 Windows Vista 引入的安全措施有关。试图保护关键文件的操作系统拒绝访问它们。有一种方法可以在不损害安全性的情况下绕过此机制。尝试在兼容模式下运行您的应用程序。当应用程序在兼容模式下运行时,从/到系统文件夹的读/写操作将被重定向到位于 C:\Users[当前用户]\AppData\Local\VirtualStore 中的“安全”目录。
有关 http://www.windowsecurity.com/ 的详细信息文章/保护系统文件-UAC-虚拟化-Part1.html。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
你是否正确安装了BDE?它应该使用 DBDEMOS 文件。您在 BDE 管理实用程序中看到这样的别名吗?你能在 Delphi 演示之一中打开该数据库吗?
BDE不是二十一世纪的数据库,它是二十年前开发的,最近从未升级过。这是一种过时的技术,但因为它仍然随 Delphi 的每个版本一起提供,并且具有已知的数据库,所以仍然经常在演示中使用,因为不需要安装任何新内容。
无论如何,该文件不是它的配置文件。它是一个共享锁文件,允许多个用户同时使用数据库。因为它是一个基于文件的数据库,没有中央服务器,所以它必须使用这种共享文件。通常其位置会更改为网络共享,但由于历史原因默认为 C:\。
无论如何,不仅仅是 BDE 还在尝试在 prong 目录中写入。我仍然看到大量应用程序尝试写入 C:\(尤其是日志)或其他只读位置。
Did you install the BDE correctly? It should use the DBDEMOS files. Do you see such an alias in the BDE administration utility? Can you open that database in one of the Delphi demos?
The BDE is not a XXI century database, it was developed twenty years ago and never upgraded lately. It's an obsolete tecnology, but because it comes still with every release of Delphi with a known database it is still often used in demos because nothing new has to be installed.
Anyway that file is not its configuration file. It's a sharing lock file to allow more than one user to use the database concurrently. Because it is a file based database without a central server, it has to use such kind of shared files. Usually its position is changed to a network share, but it defaults to C:\ for historical reasons.
Anyway it's not only the BDE still attempting to write in the prong directories. I still see a full bunch of applications attempting to write to C:\ (especially logs) or other read-only positions.