Subject Re: [firebird-support] Anyone ever seen error "cannot attach to password database"?
Author Sam Hunt
Helen Borrie wrote:

>At 04:44 PM 12/04/2005 -0700, you wrote:
>
>
>
>>Q: What version of Fb you are using and the *exact* platform it is running on
>>A: FB1.5.2 4731 Superserver on XP Pro
>>
>>
>
>*********************************************************
>
>
>
>>Q: The connection string that the remote client is using to connect to
>>the database.
>>A: \\NSTI-2\C:\Program Files\AT6TestData (NSTI-2 is the server's
>>computer name.)
>>
>>
>
>As a reality check that NSTI-2 is actually the server's hostname and not a
>mapped location, will you please go into the command line window of one of
>the problem client machines and type the command:
>
>ping NSTI-2
>
>Copy paste exactly what is returned. (Highlight the lines with the mouse
>and press Enter to copy them to the clipboard).
>
>
>
>
>
>>Q: What version string is reported for the client library on the remote
>>client
>>(by studying the property sheet of the DLL).
>>A: File Version: 1.5.2.4731
>>
>>Q: The exact path location of the Firebird installation on the server
>>A: C:\Program Files\Firebird\Firebird_1_5 (This is where Security.fdb
>>is located.)
>>
>>Q: The exact, ABSOLUTE path location of the database on the server
>>A: C:\Program Files\AT6TestData
>>
>>Pertinent Info?:
>>The client PC (NSTI-8) is executing \\NSTI-2\C\AT6TestApp\program
>>name.exe, which it has full rights to.
>>The "C" between the two back slashes is a Workgroup share name.
>>
>>
>
>*******************************
>
>
>
>>The app attempts to connect to two ODBC data sources, each defined in the
>>connectionstring property of a Delphi 7 ADOConnection object in a datamodule.
>>
>>
>
>Provide all the details of the definitions of BOTH of these ODBC data
>sources, **including** the exact connection strings. (copy/paste from your
>definitions). You can fiddle with the file part of the database file name
>but provide the **exact** suffix you are using for the database file
>name. On XP, this REALLY MATTERS.
>
>If you are using Firebird aliasing for the database path, then provide the
>alias entry from aliases.conf.
>
>
>
>
>>I use the following syntax to open each database on the formCreate method
>>of the mainform.
>>if not db.active then
>> db.open;
>>I create the data module where each ADOConnection object resides just
>>prior to the open statements.
>>This works fine when I execute the app on the server.
>>Not so when I execute the app remotely from the client.
>>
>>
>
>Currently, the issue is that your client connection request is not able to
>do the first part of the connection procedure, which is to get
>authentication for the connecting user. The reason is that it can't attach
>to security.fdb, which it must do - TWICE - once for each datasource.
>
>So - the first point of call here is to find out what is wrong with the way
>your application is trying to connect across the network. For this, we
>need better clues than we have so far.
>
>The more exact the Firebird-specific info you provide, the sooner the
>problem can be found. Don't put us through another round of trying to
>squeeze blood from a stone. Requested details such as connection strings,
>hostnames, file suffixes and ping tests do actually matter...
>
>./hb
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
Thot I'd show you the exact code that attempts the connection.
procedure TfMainForm.FormShow(Sender: TObject);
begin
try
fMainForm.WindowState:=wsMaximized;
dm:=Tdm.create(application);//dm is the the data module
if not (dm.AuctionTracker.Connected) then
dm.AuctionTracker.Open;//this line fails from the client pc and
never gets to the next db open
if not (dm.Constituent.Connected) then
dm.Constituent.open;
try
if not assigned(dlgSelectAuction) then
dlgSelectAuction:=TdlgSelectAuction.create(application);
dlgSelectAuction.showmodal;
finally
dlgSelectAuction.free;
dlgSelectAuction:=nil;
end;
except
on e:exception do
messagedlg('An error occurred in procedure TfMainForm.FormShow.'+#13+
'Report the following error to support.'+#13+
'Error: '+e.Message,mterror,[mbok],0);
end;//try
end;

BTW, I didn't report this problem correctly.
When the database is located at the non-shared \\NSTI-2\C:\Program
Files\AT6TestData and I run the app from the client PC, I get the
following error:

Error: I/O error for file "C:\Program Files\AT6TestData\mydb.fdb"
Error while trying to open file
Access is denied.

When I locate the databases(s) in a READ/WRITE shared directory on the
server, I no longer get the "access denied" error, and, instead, get the
"cannot attach to password database".

Thx
Sam Hunt