/packages/fcl-db/src/datadict/fpddodbc.pp
Puppet | 72 lines | 52 code | 20 blank | 0 comment | 1 complexity | a4be88ac306a0aa8db549582405a9316 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1{ 2 This file is part of the Free Pascal run time library. 3 Copyright (c) 2007 by Michael Van Canneyt, member of the 4 Free Pascal development team 5 6 ODBC Data Dictionary Engine Implementation. 7 8 See the file COPYING.FPC, included in this distribution, 9 for details about the copyright. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 15 **********************************************************************} 16unit fpddodbc; 17 18{$mode objfpc}{$H+} 19 20interface 21 22uses 23 Classes, SysUtils, sqldb, fpdatadict, fpddsqldb; 24 25Type 26 { TSQLDBODBCDDEngine } 27 28 TSQLDBODBCDDEngine = Class(TSQLDBDDEngine) 29 Protected 30 Function CreateConnection(AConnectString : String) : TSQLConnection; override; 31 Public 32 Class function Description : string; override; 33 Class function DBType : String; override; 34 end; 35 36Procedure RegisterODBCDDengine; 37Procedure UnRegisterODBCDDengine; 38 39implementation 40 41uses odbcconn; 42 43procedure RegisterODBCDDengine; 44begin 45 RegisterDictionaryEngine(TSQLDBODBCDDEngine); 46end; 47 48procedure UnRegisterODBCDDengine; 49begin 50 UnRegisterDictionaryEngine(TSQLDBODBCDDEngine); 51end; 52 53{ TSQLDBODBCDDEngine } 54 55function TSQLDBODBCDDEngine.CreateConnection(AConnectString: String 56 ): TSQLConnection; 57begin 58 Result:=TODBCConnection.Create(Self); 59end; 60 61class function TSQLDBODBCDDEngine.Description: string; 62begin 63 Result:='ODBC connection using SQLDB'; 64end; 65 66class function TSQLDBODBCDDEngine.DBType: String; 67begin 68 Result:='ODBC'; 69end; 70 71end. 72