Subject Changing database path
Author Jack Cane, PhD
I am using Firebird hooked to tIboDatabase, compiled with Delphi 6.

Since my new server will have its FireBird connection at a location that is
different from my test environment, my app needs to make a decision at
startup (runtime) as to where to find its database. This is a webhub app and
I set the location with a literal.

In testing, the behavior is as expected when, with the same path, the file
name is changed, but if a new path is given (tracing confirms the new path
is correct), it appears that the app still looks for its data in the
original (design-time) path. I tested with no data at the new location, but
the app made a normal startup, finding its data at the old location.

In addition to the code below, what else do I need to do?

I am assuming that my tIboQuery objects' database name properties will
conform to that of tIboDatabase, and do not have to be separately reassigned
at runtime.

The folllowing code is executed in the FormCreate() method:

with dbOcaf do begin

Connected := false;

DatabaseName := pWebApp.Literal[ 'DatabaseName' ];


connected := true;

except on e:exception do begin

(* log the error *)


end; { on e:exception }

end; { try...except }

end; { with dbOcaf }





[Non-text portions of this message have been removed]