Delphi Examples: DbiGetLdObj

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetLdObj

Return to chapter overview

Obtain the language driver information for TDataSet descendant D.

TStrings LdObjList is filled with the language driver information. This example uses the following input:

 fDbiGetLdObj(Table1, Listbox1.Items);

 

The procedure is:

procedure fDbiGetLdObj(D: TDataSet; LdObjList: TStrings);

var

 MypLdObj: pLDDesc;

begin

 Check(DbiGetLdObj(D.Handle, Pointer(MypLdObj)));

with MypLdObj^, LdObjList do begin

   Add(Format('Name: %s', [szName]));

   Add(Format('Description: %s', [szDesc]));

   Add(Format('Code Page: %d', [iCodePage]));

  case PrimaryCpPlatform of

     1: Add('Primary Platform: DOS(OEM) platform');

     2: Add('Primary Platform: Windows (ANSI) platform');

     6: Add('Primary Platform: HP UNIX (ROMAN8) platform');

  else

     Add(Format('Primary Platform: Other (%d)', [PrimaryCpPlatform]));

  end;

end;

end;