|
Home > Archive > dBASE Questions and Answers > September 2005 > Retrieving ALIAS directory
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Retrieving ALIAS directory
|
|
| John Marshall 2005-09-30, 1:23 pm |
| I am using the cc.ini and want both my local and remote users to use the same ini as defined in a specific alias.
In the use example, the 'home' directory is accessed by usign the set("directory") function. Is there a way to extract the directory (drive and folders) of a defined ALIAS?
What I'd really like to be able to do is the following:
cinihome = :TIP: + "\tip.ini"
form.myini = new ini(cinihome)
.... and have the resolution made.
Is there a way to get at either the BDE or dBase specific alias folders?
PS: Can one also "set" or "add" a dBase alias programatically?
Thanks,
JM
| |
| Michael Nuwer [dBVIPS] 2005-09-30, 8:24 pm |
|
The following might help. You do not say what kind of alias you are
looking for -- Source code or database. Note that a source code alias
does not exit in a runtime application.
// Source Code Aliases
cKey = _app.sourceAliases.firstKey
for i=1 to _app.sourceAliases.count()
? _app.sourceAliases[cKey]
cKey := _app.sourceAliases.nextKey( cKey )
endfor
? " "
/// Database Aliases
////////////////////////////
set procedure to :duflp:bdealias.cc addi
oBDE = new bdealias()
? oBDE.DatabaseDir("DBASESAMPLES")
John Marshall wrote:
> I am using the cc.ini and want both my local and remote users to use the same ini as defined in a specific alias.
>
> In the use example, the 'home' directory is accessed by usign the set("directory") function. Is there a way to extract the directory (drive and folders) of a defined ALIAS?
>
> What I'd really like to be able to do is the following:
>
> cinihome = :TIP: + "\tip.ini"
> form.myini = new ini(cinihome)
> ... and have the resolution made.
>
> Is there a way to get at either the BDE or dBase specific alias folders?
>
> PS: Can one also "set" or "add" a dBase alias programatically?
>
> Thanks,
>
> JM
| |
| john marshall 2005-09-30, 8:24 pm |
| The Source Code Aliases seems to be just the ticket!
Thanks,
JM
Michael Nuwer [dBVIPS] Wrote:
[color=darkred]
>
> The following might help. You do not say what kind of alias you are
> looking for -- Source code or database. Note that a source code alias
> does not exit in a runtime application.
>
>
> // Source Code Aliases
> cKey = _app.sourceAliases.firstKey
> for i=1 to _app.sourceAliases.count()
> ? _app.sourceAliases[cKey]
> cKey := _app.sourceAliases.nextKey( cKey )
> endfor
>
> ? " "
> /// Database Aliases
> ////////////////////////////
> set procedure to :duflp:bdealias.cc addi
> oBDE = new bdealias()
> ? oBDE.DatabaseDir("DBASESAMPLES")
>
>
>
>
> John Marshall wrote:
|
|
|
|
|