Board index » delphi » Changing databasename/alias on TDatabase component

Changing databasename/alias on TDatabase component

Hello,
I have a frustrating problem.  I have a development directory and a test directory on the same machine.  I have a BDE alias set to the "DEV" directory and an alias set to "TEST".  All this is with Paradox DB.  I can finish the development phase  and have everything connected just fine and working.  I then copy everything to the "TEST" directory.  I go and change the 1 TDatabase component to look at the "TEST" alias.  when I go back to the development project directory, it has been changed to look at the test one as well.  Why can't I seem to seperate these two?  Any help would be greatly appreciated?

Andrew Brott
Three Creeks Computing, Inc.

 

Re:Changing databasename/alias on TDatabase component


Open your project file and looked at the past to the forms at the top.  It
sounds like you have a full path hard coded some place.

--
Bill

Re:Changing databasename/alias on TDatabase component


Also, it is worth considering using the TDatabase as a pseudo-alias
and do away with the real aliases altogether.

You can change the directory that the TDatabase points to at run time,
which would allow you to run the same app without having to edit anything.
Just have the app detect where it is running from, and choose a data
directory to suit.

See http://www.cix.co.uk/~bsparrow/delphi/tdatabase.html.

--Bill Sparrow--
Member of the UK Borland User Group

Re:Changing databasename/alias on TDatabase component


Quote
bsparrowXsp...@cix.co.uk (Bill Sparrow) wrote:
>Also, it is worth considering using the TDatabase as a pseudo-alias
>and do away with the real aliases altogether.

>You can change the directory that the TDatabase points to at run time,
>which would allow you to run the same app without having to edit anything.
>Just have the app detect where it is running from, and choose a data
>directory to suit.

>See http://www.cix.co.uk/~bsparrow/delphi/tdatabase.html.

>--Bill Sparrow--
>Member of the UK Borland User Group

thanks very much....I'll try to look at this today!

Other Threads