EDBEngineError-Network Initialization Failed

Bill picture Bill · Jan 12, 2009 · Viewed 11.9k times · Source

I am attempting to convert a Dephi 2006 project to Delphi 2009 (Delphi 2006 is on Drive C Delphi 2009 is on Drive D).

On the main form there is a DataSource1: TDataSource; and a Table1: TTable;

In OnFormShow the table filename is set to:

TableFilename := IncludeTrailingPathDelimiter( MyProfileFolder ) + 'Delphi 2009\Projects\Adirondack Lake Maps\' + 'TITLES.DB';
Table1.Active := False;
Table1.TableName := TableFilename;
Table1.Active := True;

When running the app I get:

EDBEngineError-Network Initialization Failed 
Permission Denied
File C:\PDOXUSERS.NET
Directory: c:\

Questions:

  1. How do I set the correct path to PDOXUSERS.NET?
  2. This is a simple application that stores scanned lake maps in a database and displays information about the lake in a few fields.
  3. In the past I used to use the BDE. What is the simplest database access component to use to replace the BDE and where can I learn more about this? There are a lot of database engines now for Delphi 2009 I do not know where to start.

More info I am running Delphi 2009 on Vista.

Answer

Rob Kennedy picture Rob Kennedy · Jan 12, 2009

Add a TSession component to your project. Set its NetFileDir property to a location that is writable by normal users, such as the common appdir folder. The pdoxusers.net file will be stored there instead. For more, see a newsgroup post on comp.lang.pascal.delphi.misc.

This has nothing to do with Delphi 2009 and everything to do with Windows Vista and its more stringently enforced user permissions.

If you're looking for an alternative to the BDE, start with the BDE Alternatives Guide. (It says it has a new home, but it doesn't.)