How to modify the pathname of an existing alias in code
with Delphi 1.
DbiDeleteAlias doesn't exist.
Please help me
Thank you
How to modify the pathname of an existing alias in code
with Delphi 1.
DbiDeleteAlias doesn't exist.
Please help me
Thank you
This is a how I do it:
procedure ...
var
config : ^CFGDesc;
nIndex : Integer;
curs : hDBICur;
found : Boolean;
result : DBIResult;
begin
GetMem( config, sizeof( CFGDesc ) );
{
On following line, replace xxx with alias name:
such as \DATABASES\MY ALIAS\DB INFO\
}
DbiOpenCfgInfoList( nil, dbiREADWRITE, cfgPersistent,
'\DATABASES\xxx\DB INFO\' );
found := FALSE;
result := DbiGetNextRecord( curs, dbiNOLOCK, config, nil );
while ( ( result = 0 ) and ( found = FALSE ) ) do
begin
if ( strcomp( config^.szNodeName, 'PATH' ) = 0 ) then
begin
found := TRUE;
{ Change to new path here }
StrCopy( config^szValue, 'c:\' );
DbiModifyRecord( curs, dbiNOLOCK, config, nil );
end;
result := DbiGetNextRecord( curs, dibNOLOCK, config, nil );
end;
FreeMem( config, sizeof( CFGDesc ) );
end;
Good luck,
Blake Schwendiman
Ag Decisions, Inc.
Quote:> How to modify the pathname of an existing alias in code
> with Delphi 1.
> DbiDeleteAlias doesn't exist.
> Please help me
> Thank you
1. Modify or delete alias in code (D1)
How to modify the pathname of an existing alias in code
with Delphi 1.
DbiDeleteAlias doesn't exist.
Please help me
Thank you
2. mysql
3. How to get pathname from alias?
4. How to compile my data base
5. How to modify AccessBasic Code with Code?
7. Add or modify Aliases with Delphi 3.0 Components
8. - Oracle Manufacturing Consultants
9. Modify Alias Param On Install?
11. Changing alias in coding is not reflected until restart
13. How to create an alias to an MS Access database in code