views:

1462

answers:

3

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.
A: 

More info I am running Delphi 2009 on Vista.

+2  A: 

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.)

Rob Kennedy
A: 

You can change the default location of the .net file if you go into the BDE Administrator (in the control panel) and go into Configuration -> Drivers -> Native -> Paradox and change the path to somewhere that is writable (My Documents for example). You may need to run the BDE Administrator as Administrator, and you can do this by running it directly by right clicking c:\program files\common files\Borland Shared\BDE\BDEAdmin.exe and selecting run as administrator.

Things get more confusing however as because the BDE is not a Vista app, Vista may use the virtual store to save the configuration files, and you'll probably have to delete these. I can't remember where the virtual store is off the top of my head however as I primarily use XP.

Alister