Delphi Examples: DbiOpenLdList

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiOpenLdList

Return to chapter overview

Example 1: Return all language driver information for the system

This example uses the following input:

 GetLdList(Memo1.Lines);

 

The function is defined as follows:

procedure GetLdList(Lines: TStrings);

var

 hCur: hDBICur;

 LD: LDDesc;

begin

 // get a cursor to the in-mem table containing language driver information...

 Check(DbiOpenLdList(hCur));

try

  while (DbiGetNextRecord(hCur, dbiNOLOCK, @LD, nil) = DBIERR_NONE) do begin

     // add the name, code page, and description to the result...

     Lines.Add('Name: ' + LD.szName + '  Code Page: ' + IntToStr(LD.iCodePage));

     Lines.Add('    Description: ' + LD.szDesc);

  end;

finally

   Check(DbiCloseCursor(hCur));

end;

end;