Question and Answer Database FAQ: FAQ4700B — Obtaining a list of available BDE language drivers Category: BDE Platform: All-32Bit Product: Delphi2.x, Delphi3.x, Delphi4.x, Question: How can I retreive a list of available BDE language drivers? Answer: The following Delphi procedure returns a formatted list of available BDE language drivers. The procedure can be called as shown in the buttonclick method below. Add BDE and DBTables to your unit's uses clause. procedure GetLdList(Lines: TStrings); var hCur: hDBICur; LD: LDDesc; cnt:integer; begin // get a cursor to the in-mem table containing language // driver information... cnt:=0; check(dbiinit(nil)); Check(DbiOpenLdList(hCur)); try while (DbiGetNextRecord(hCur, dbiNOLOCK, @LD, nil) = DBIERR_NONE) do begin cnt:=cnt+1; Lines.Add(format('%4d %-6s%-10s %-10s%5s %-10s %-10s', [cnt,'Name:',LD.szName,'Code Page:',IntToStr(LD.iCodePage), 'Description:',LD.szDesc])); end; finally Check(DbiCloseCursor(hCur)); check(dbiexit); end; end; procedure TForm1.Button1Click(Sender: TObject); begin getldlist(memo1.lines); end; end. 7/13/99 10:12:07 AM
Last Modified: 01-SEP-99