From: Carlo B. <car...@us...> - 2005-07-01 23:29:31
|
Update of /cvsroot/instantobjects/Source/Brokers/ADO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1981/Source/Brokers/ADO Modified Files: InstantADO.pas Log Message: Added MS-SQL catalog support for dbevolver and changed DBX and ADO brokers to use it. Index: InstantADO.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/InstantADO.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** InstantADO.pas 17 Jun 2005 19:11:53 -0000 1.10 --- InstantADO.pas 1 Jul 2005 23:29:22 -0000 1.11 *************** *** 169,172 **** --- 169,173 ---- TInstantADOMSSQLBroker = class(TInstantSQLBroker) protected + function CreateCatalog(const AScheme: TInstantScheme): TInstantCatalog; override; function CreateResolver(Map: TInstantAttributeMap): TInstantSQLResolver; override; function GetSQLQuote: Char; override; *************** *** 174,177 **** --- 175,180 ---- procedure AssignDataSetParams(DataSet : TDataSet; AParams: TParams); override; public + function CreateDBBuildCommand( + const CommandType: TInstantDBBuildCommandType): TInstantDBBuildCommand; override; function CreateDataSet(const Statement: string; Params: TParams): TDataSet; override; function DataTypeToColumnType(DataType: TInstantDataType; Size: Integer): string; override; *************** *** 191,195 **** uses ADOInt, ComObj, InstantConsts, InstantUtils, InstantADOX, ! InstantADOConnectionDefEdit, InstantADOTools, Controls; const --- 194,198 ---- uses ADOInt, ComObj, InstantConsts, InstantUtils, InstantADOX, ! InstantADOConnectionDefEdit, InstantADOTools, Controls, InstantDBBuild, InstantMSSqlCatalog; const *************** *** 1037,1040 **** --- 1040,1049 ---- end; + function TInstantADOMSSQLBroker.CreateCatalog( + const AScheme: TInstantScheme): TInstantCatalog; + begin + Result := TInstantMSSqlCatalog.Create(AScheme, Self); + end; + function TInstantADOMSSQLBroker.CreateDataSet(const Statement: string; Params: TParams): TDataSet; *************** *** 1057,1060 **** --- 1066,1090 ---- end; + function TInstantADOMSSQLBroker.CreateDBBuildCommand( + const CommandType: TInstantDBBuildCommandType): TInstantDBBuildCommand; + begin + if CommandType = ctAddTable then + Result := TInstantDBBuildAddTableSQLCommand.Create(CommandType, Connector) + else if CommandType = ctDropTable then + Result := TInstantDBBuildDropTableSQLCommand.Create(CommandType, Connector) + else if CommandType = ctAddField then + Result := TInstantDBBuildAddFieldSQLCommand.Create(CommandType, Connector) + else if CommandType = ctAlterField then + Result := TInstantDBBuildAlterFieldSQLCommand.Create(CommandType, Connector) + else if CommandType = ctDropField then + Result := TInstantDBBuildDropFieldSQLCommand.Create(CommandType, Connector) + else if CommandType = ctAddIndex then + Result := TInstantDBBuildAddIndexSQLCommand.Create(CommandType, Connector) + else if CommandType = ctDropIndex then + Result := TInstantDBBuildDropIndexSQLCommand.Create(CommandType, Connector) + else + Result := inherited CreateDBBuildCommand(CommandType); + end; + function TInstantADOMSSQLBroker.CreateResolver( Map: TInstantAttributeMap): TInstantSQLResolver; |