zeoslib  UNKNOWN
 All Files
ZPlainAdoDriver.pas
Go to the documentation of this file.
1 {*********************************************************}
2 { }
3 { Zeos Database Objects }
4 { Delphi plain driver interface to ADO }
5 { }
6 { Originally written by Janos Fegyverneki }
7 { }
8 {*********************************************************}
9 
10 {@********************************************************}
11 { Copyright (c) 1999-2012 Zeos Development Group }
12 { }
13 { License Agreement: }
14 { }
15 { This library is distributed in the hope that it will be }
16 { useful, but WITHOUT ANY WARRANTY; without even the }
17 { implied warranty of MERCHANTABILITY or FITNESS FOR }
18 { A PARTICULAR PURPOSE. See the GNU Lesser General }
19 { Public License for more details. }
20 { }
21 { The source code of the ZEOS Libraries and packages are }
22 { distributed under the Library GNU General Public }
23 { License (see the file COPYING / COPYING.ZEOS) }
24 { with the following modification: }
25 { As a special exception, the copyright holders of this }
26 { library give you permission to link this library with }
27 { independent modules to produce an executable, }
28 { regardless of the license terms of these independent }
29 { modules, and to copy and distribute the resulting }
30 { executable under terms of your choice, provided that }
31 { you also meet, for each linked independent module, }
32 { the terms and conditions of the license of that module. }
33 { An independent module is a module which is not derived }
34 { from or based on this library. If you modify this }
35 { library, you may extend this exception to your version }
36 { of the library, but you are not obligated to do so. }
37 { If you do not wish to do so, delete this exception }
38 { statement from your version. }
39 { }
40 { }
41 { The project web site is located on: }
42 { http://zeos.firmos.at (FORUM) }
43 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
44 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
45 { }
46 { http://www.sourceforge.net/projects/zeoslib. }
47 { }
48 { }
49 { Zeos Development Group. }
50 {********************************************************@}
51 
52 unit ZPlainAdoDriver;
53 
54 interface
55 
56 {$I ZPlain.inc}
57 
58 uses ZClasses, ZPlainDriver;
59 
60 type
61  TZAdoPlainDriver = class (TZAbstractPlainDriver, IZPlainDriver)
62  protected
63  function IsAnsiDriver: Boolean; override;
64  public
65  constructor Create;
66 
67  procedure LoadCodePages; override;
68  function GetProtocol: string; override;
69  function GetDescription: string; override;
70  procedure Initialize(const Location: String = ''); override;
71  function Clone: IZPlainDriver; override;
72  end;
73 
74 implementation
75 
76 uses ZCompatibility, ZEncoding;
77 
78 procedure TZAdoPlainDriver.LoadCodePages;
79 begin
80  AddCodePage('CP_ADO', 0, ceAnsi, ZDefaultSystemCodePage,'',1, False);
81 end;
82 
83 function TZAdoPlainDriver.IsAnsiDriver: Boolean;
84 begin
85  Result := False;
86 end;
87 
88 constructor TZAdoPlainDriver.Create;
89 begin
90  LoadCodePages;
91 end;
92 
93 function TZAdoPlainDriver.GetProtocol: string;
94 begin
95  Result := 'ado';
96 end;
97 
98 function TZAdoPlainDriver.GetDescription: string;
99 begin
100  Result := 'Native driver for Microsoft ADO';
101 end;
102 
103 procedure TZAdoPlainDriver.Initialize(const Location: String = '');
104 begin
105 end;
106 
107 function TZAdoPlainDriver.Clone: IZPlainDriver;
108 begin
109  Result := Self;
110 end;
111 
112 end.
113