fcl-db: sqldb: add PSGetTableName; addition to rev.27074

git-svn-id: trunk@27114 -
This commit is contained in:
lacak 2014-03-12 10:56:49 +00:00
parent 17ad74aba4
commit 607369f830

View File

@ -144,8 +144,6 @@ type
TSQLConnection = class (TDatabase)
private
FFieldNameQuoteChars : TQuoteChars;
FLogEvents: TDBEventTypes;
FOnLog: TDBLogNotifyEvent;
FPassword : string;
FTransaction : TSQLTransaction;
FUserName : string;
@ -153,11 +151,13 @@ type
FCharSet : string;
FRole : String;
FStatements : TFPList;
FLogEvents: TDBEventTypes;
FOnLog: TDBLogNotifyEvent;
function GetPort: cardinal;
procedure SetPort(const AValue: cardinal);
protected
FConnOptions : TConnOptions;
FSQLFormatSettings : TFormatSettings;
FSQLFormatSettings : TFormatSettings;
// Updating of DB records is moved out of TSQLQuery.
// It is done here, so descendents can override it and implement DB-specific.
// One day, this may be factored out to a TSQLResolver class.
@ -432,7 +432,8 @@ type
class function FieldDefsClass : TFieldDefsClass; override;
// IProviderSupport methods
function PSGetUpdateException(E: Exception; Prev: EUpdateError): EUpdateError; override;
Property TableName : String Read FTableName Write FTableName;
function PSGetTableName: string; override;
Property TableName : String Read FTableName Write FTableName; // alternative: procedure DoGetTableName
public
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
@ -2488,6 +2489,11 @@ begin
Result := EUpdateError.Create(SOnUpdateError, E.Message, ErrorCode, PrevErrorCode, E);
end;
function TCustomSQLQuery.PSGetTableName: string;
begin
Result := FTableName;
end;
{ TSQLScript }
procedure TSQLScript.ExecuteStatement(SQLStatement: TStrings;