Changing Alias pathing

Posted on 1998-05-20
Last Modified: 2010-04-03
Need to know how to change BDE ALIAS path during runtime

Ken Orlikowski
Question by:kenno
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4

Expert Comment

ID: 1346827
          I am also trying to do the same thing at the moment. Now what I have come up with so far is if you look at the file in the borland\docs directory (I presume you are using Delphi 3 ?) there is a structure defined called pDBDesc. Now there is also a function called DbiGetDatabaseDesc and will return the logical ALIAS and also the pathname and is stored in the pDBDesc record structure. I am trying this at the moment but just thought I would let you know as you are encountering a similar problem.


Expert Comment

ID: 1346828
          Meant to put this above but if you type in dbiGetDatabaseDesc in your Code somewhere and just Ctrl-F1 that word you will be taken to the description and are given 2 examples one for C++ and the other for Delphi . These may help you.


Expert Comment

ID: 1346829
          Also remember to add BDE to your uses clause as this is the unit the dbi...
functions access. Putting this up as I am testing it.


Expert Comment

ID: 1346830
          Another couple of functions I would look at seeing as though you want to change the ALias path at run time is dbiGetProp and dbiSetProp these are more applicable probably seeing as though you want to actually change the values. Anyway hope these comments help.


Accepted Solution

lucab earned 50 total points
ID: 1346831
You must use a TSession in this way:

      Session1.GetAliasParams( ALIASNAME, lt1);

in lt1 you'll have an item like this
        PATH= Mydirectory
        SERVER NAME= MyServer name \ my databasename

you can modify these values as you like and with

        Session1.ModifyAlias( ALIASNAME, lt1);
you can save your temporary changes.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question