Finding "Server Name" from BDE Alias 
Author Message
 Finding "Server Name" from BDE Alias

I am trying to get the Server Name property from a BDE alias.  I'm
guessing that I have to access the BDE directly.  I think I may be close
but not quite close enough.  This is what I have tried.

uses DBITypes, DBIProcs, ....;

procedure TForm1.Button1Click(Sender: TObject);
var
  Str: Pchar;
  pDBInfo: pDBDesc;
  Size: Integer;
  TheServerName: String;
begin
  Str:= StrNew('DBDEMOS');
  Size:= SizeOf(DBDesc);
  pDBInfo:= MemAlloc(Size);
  DbiGetDatabaseDesc(Str, pDBInfo);
  TheServerName:= StrPas(pDBInfo^.szPhyName);
  StrDispose(Str);
  FreeMem(pDBInfo,Size);
end;

This is through delphi 1.  Any ideas??



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. BDE Setup Error "Object Not Found"

2. The keys "-"/"+"/"*"

3. Trap Execp "Unknown Alias"?

4. "Name Not Unique In This Context"

5. EDBEngineError "Invalid File Name"

6. "Invalid index/tag name."

7. Table name is "GROUP"

8. Getting "long" file names

9. ""256 Color Mouse""

10. wanted: DBLookup"Find"Combo

11. Help finding "Console Application"

12. TP6/Win95 "bug" found

 

 
Powered by phpBB® Forum Software