Solved

Changing Alias pathing

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

Ken Orlikowski
0
Comment
Question by:kenno
  • 4
5 Comments
 

Expert Comment

by:westy100697
ID: 1346827
kenno,
          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 bde.int 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.

Regards
WESTY
0
 

Expert Comment

by:westy100697
ID: 1346828
kenno,
          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.

Regards
WESTY
0
 

Expert Comment

by:westy100697
ID: 1346829
kenno,
          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.

regards
WESTY
0
 

Expert Comment

by:westy100697
ID: 1346830
kenno,
          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.

WESTY
0
 

Accepted Solution

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

      lt1:=TStringList.Create;
      Session1.GetAliasParams( ALIASNAME, lt1);

in lt1 you'll have an item like this
     
        PATH= Mydirectory
and
        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.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use Hashing sha1 in Delphi 2010 4 262
How to debug For loops? 3 49
Tembedded WB animatid gifs not animated on some pcs 2 79
Delphi: sending SMS on android platform 1 19
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

775 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