Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How To retrieve a list of available BDE language drivers Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Retrieve a list of available BDE language drivers 18-Jan-03
Category
BDE
Language
Delphi 2.x
Views
120
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: William Gerbert 

How can I retrieve 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.

1   procedure GetLdList(Lines: TStrings);
2   var
3     hCur: hDBICur;
4     LD: LDDesc;
5     cnt: integer;
6   begin
7     // get a cursor to the in-mem table containing language
8     // driver information...
9     cnt := 0;
10    check(dbiinit(nil));
11    Check(DbiOpenLdList(hCur));
12    try
13      while (DbiGetNextRecord(hCur, dbiNOLOCK, @LD, nil) = DBIERR_NONE) do
14      begin
15        cnt := cnt + ;
16        Lines.Add(format('%4d %-6s%- 0s %- 0s%5s %- 0s %- 0s', [cnt, 'Name:', 
17  LD.szName,
18          'Code Page:', IntToStr(LD.iCodePage), 'Description:', LD.szDesc]));
19      end;
20    finally Check(DbiCloseCursor(hCur));
21      check(dbiexit);
22    end;
23  end;
24  
25  procedure TForm.Button Click(Sender: TObject);
26  begin
27    getldlist(memo.lines);
28  end;
29  
30  end.


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC