|
<< Click to Display Table of Contents >> C Examples: DbiAddAlias |
![]() ![]()
|
Example 1: Add a STANDARD database alias to the configuration file.
This example uses the following input:
fDbiAddAlias1("TestAlias", "PATH:C:\\BDE32\\EXAMPLES\\TABLES");
DBIResult fDbiAddAlias1(char *AliasName, char *AliasPath)
{
DBIResult rslt;
rslt = Chk(DbiAddAlias(NULL, AliasName, NULL, AliasPath, TRUE));
return rslt;
}
Example 2: Add an InterBase database alias to the configuration file.
This example uses the following input:
fDbiAddAlias2("RemoteAlias",
"PATH:frobosrv:d:/interbas;"
"SERVER NAME:frobosrv:d:/interbas/slim.gdb;"
"USER NAME:test;"
"SQLQRYMODE:SERVER;"
"SQLPASSTHRU MODE:SHARED NOAUTOCOMMIT");
| Note: | The last parameter in the string does not have a semicolon (;) at the end. |
DBIResult fDbiAddAlias2(char *AliasName, char *AliasPath)
{
DBIResult rslt;
rslt = Chk(DbiAddAlias(NULL, AliasName, "INTRBASE", AliasPath, TRUE));
return rslt;
}