views:

363

answers:

2

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. Database is Firebird, middle-ware is IBO 4.7.

I posted this in another thread, but know I have a lot more info, & it seems that the BDE is the problem. Apparently the DB.Pas is linked in. I can see it in the project.map file, & the exe reads the Registry to get the BDE alias.

I've removed all the BDE-related sources & dcu files, I've searched the project exhaustively for an DB component & it comes up clean.

Has anybody been there?

+4  A: 

Assuming you're not building with packages - remove db.pas and db.dcu from the disk (rename them to db!.pas and db!.dcu, for example) and rebuild. Compiler should stop where the db is referenced from.

gabr
You may have to use the CommandLine to compile, the designer may also rely on Db.pas.
Henk Holterman
Designer is compiled into packages and should not affect the compilation.
gabr
+1  A: 

I solved it with your help. First gabr recommended I remove the .dcus. I had, but found a few, including db.dcu. Killed it. Now the compile stopped at uses IB.dcu (Borlands interface to Interbase). Killed it, & got a compile. Grepped for DB in the .map - not present. Still wouldn't work as Paris, so I found a Jason comment in the sources that revealed that the AliasName property of TConnection was for the BDE Alias, not the FireBird Alias, so I set the property to blank.

Ran the exe under Paris & it worked!.

Now, I need to tell you I had taken this home for the weekend, hoping for some focus. When it worked I yelled BLOODY BONZER! at the top of my voice - & all three cats dove off & hid.

"IB," - 3 chars in 700 thousand lines of code!

So if anyone is haunted by this ghost, grep for IB!

Thanks guys (gals?) - how do I credit you with the best answer?

Thanks, Dave.

Just pick the answer that helped you best and click the Accept button. It helps by sifting 'answered' and unaswered' questions.
Henk Holterman