views:

234

answers:

4

In my Delphi7 app, I can connect to the database when logged in as Administrator ("Dave"), but not when logged in as a standard or limited user ("Paris"). Happens on XP Home & Vista Business Ultimate 64. I use an alias for the db, and have tried placing the .fdb file in Program Files, in an app folder on the C drive, and in Users\Application Data & Documents and settings\App data.

Is there a tried & true rule for situating the .fdb file? Am I missing something obvious?

A: 

It seems you're using windows authentication to login to the database instead of firebird's native authentication.
Have you tried to supply a username and password?
Other than that, what's the actual error message when you try to connect?

Douglas Tosi
I'm using IBO 4.7. It fails at the TIB_Connection.Connect, with error message Cannot open file ''''. The system cannot find the path specified. The Connect method is in a try..except - It crashes right out, never hitting my exception code. I've added an IBO tag to the question.
have you try with IBX ? does it make the same ?
Hugues Van Landeghem
A: 

Yes, I can connect with isql as "Paris". I suspect the difficulty has something to do with where the .fdb is located. a) Program Files\Appname\Appname.fdb b) C:\Appname\Appname.fdb c) C:\Documents and Settings\All Users\Application Data\Appname\Appname.fdb

Application does not work as limited user when the database (&alias) is in all these places.

A: 

I don't believe limited users have the permission to write files to most of the places you named for storing the .FDB file:

  1. Program Files\Appname\Appname.fdb
  2. C:\Appname\Appname.fdb
  3. C:\Documents and Settings\All Users\Application Data\Appname\Appname.fdb

It sounds like you are using Firebird as an embedded database. In that case, your best bet would be to store the FDB file in each user's application data folder. For example:

C:\Documents and Settings\Paris\Application Data\Appname\Appname.fdb
dthrasher
A: 

Time to rephrase the question. I still have the same issues with limited user access, but now know that Firebird runs as a service - it should be able to r/w any file anyplace. And, mghie, your suggestion that I try to access with isql was genius. I can connect as a limited user. I'm probably breaking something in my app., & IBO trips over it.

Rephrased question: What is the generally accepted best place to install the .fdb file?