mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:26:33 +02:00
* fix duplicate parameter names
git-svn-id: trunk@2022 -
This commit is contained in:
parent
ad0f93da39
commit
3db35349ec
@ -1560,16 +1560,16 @@ begin
|
|||||||
Result:=(Bof and Eof);
|
Result:=(Bof and Eof);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TDataset.IsLinkedTo(DataSource: TDataSource): Boolean;
|
Function TDataset.IsLinkedTo(ADataSource: TDataSource): Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
//!! Not tested, I never used nested DS
|
//!! Not tested, I never used nested DS
|
||||||
if (DataSource = nil) or (DataSource.Dataset = nil) then begin
|
if (ADataSource = nil) or (ADataSource.Dataset = nil) then begin
|
||||||
Result := False
|
Result := False
|
||||||
end else if DataSource.Dataset = Self then begin
|
end else if ADataSource.Dataset = Self then begin
|
||||||
Result := True;
|
Result := True;
|
||||||
end else begin
|
end else begin
|
||||||
Result := DataSource.Dataset.IsLinkedTo(DataSource.Dataset.DataSource);
|
Result := ADataSource.Dataset.IsLinkedTo(ADataSource.Dataset.DataSource);
|
||||||
end;
|
end;
|
||||||
//!! DataSetField not implemented
|
//!! DataSetField not implemented
|
||||||
end;
|
end;
|
||||||
|
@ -257,7 +257,7 @@ type
|
|||||||
Function GetIndex : longint;
|
Function GetIndex : longint;
|
||||||
procedure SetAlignment(const AValue: TAlignMent);
|
procedure SetAlignment(const AValue: TAlignMent);
|
||||||
procedure SetIndex(AValue: Integer);
|
procedure SetIndex(AValue: Integer);
|
||||||
Procedure SetDataset(Value : TDataset);
|
Procedure SetDataset(AValue : TDataset);
|
||||||
function GetDisplayText: String;
|
function GetDisplayText: String;
|
||||||
procedure SetDisplayLabel(const AValue: string);
|
procedure SetDisplayLabel(const AValue: string);
|
||||||
procedure SetDisplayWidth(const AValue: Longint);
|
procedure SetDisplayWidth(const AValue: Longint);
|
||||||
@ -314,7 +314,7 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
procedure AssignValue(const Value: TVarRec);
|
procedure AssignValue(const AValue: TVarRec);
|
||||||
procedure Clear; virtual;
|
procedure Clear; virtual;
|
||||||
procedure FocusControl;
|
procedure FocusControl;
|
||||||
function GetData(Buffer: Pointer): Boolean;
|
function GetData(Buffer: Pointer): Boolean;
|
||||||
@ -1123,7 +1123,7 @@ type
|
|||||||
procedure Insert;
|
procedure Insert;
|
||||||
procedure InsertRecord(const Values: array of const);
|
procedure InsertRecord(const Values: array of const);
|
||||||
function IsEmpty: Boolean;
|
function IsEmpty: Boolean;
|
||||||
function IsLinkedTo(DataSource: TDataSource): Boolean;
|
function IsLinkedTo(ADataSource: TDataSource): Boolean;
|
||||||
function IsSequenced: Boolean; virtual;
|
function IsSequenced: Boolean; virtual;
|
||||||
procedure Last;
|
procedure Last;
|
||||||
function Locate(const keyfields: string; const keyvalues: Variant; options: TLocateOptions) : boolean; virtual;
|
function Locate(const keyfields: string; const keyvalues: Variant; options: TLocateOptions) : boolean; virtual;
|
||||||
@ -1614,7 +1614,7 @@ type
|
|||||||
Function GetDataSize: Integer;
|
Function GetDataSize: Integer;
|
||||||
Procedure LoadFromFile(const FileName: string; BlobType: TBlobType);
|
Procedure LoadFromFile(const FileName: string; BlobType: TBlobType);
|
||||||
Procedure LoadFromStream(Stream: TStream; BlobType: TBlobType);
|
Procedure LoadFromStream(Stream: TStream; BlobType: TBlobType);
|
||||||
Procedure SetBlobData(Buffer: Pointer; Size: Integer);
|
Procedure SetBlobData(Buffer: Pointer; ASize: Integer);
|
||||||
Procedure SetData(Buffer: Pointer);
|
Procedure SetData(Buffer: Pointer);
|
||||||
Property AsBlob : TBlobData read GetAsString write SetAsBlob;
|
Property AsBlob : TBlobData read GetAsString write SetAsBlob;
|
||||||
Property AsBoolean : Boolean read GetAsBoolean write SetAsBoolean;
|
Property AsBoolean : Boolean read GetAsBoolean write SetAsBoolean;
|
||||||
|
@ -840,14 +840,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TParam.SetBlobData(Buffer: Pointer; Size: Integer);
|
Procedure TParam.SetBlobData(Buffer: Pointer; ASize: Integer);
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Temp : String;
|
Temp : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetLength(Temp,Size);
|
SetLength(Temp,ASize);
|
||||||
Move(Buffer^,Temp,Size);
|
Move(Buffer^,Temp,ASize);
|
||||||
AsBlob:=Temp;
|
AsBlob:=Temp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -344,14 +344,14 @@ begin
|
|||||||
inherited Assign(Source);
|
inherited Assign(Source);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TField.AssignValue(const Value: TVarRec);
|
procedure TField.AssignValue(const AValue: TVarRec);
|
||||||
procedure Error;
|
procedure Error;
|
||||||
begin
|
begin
|
||||||
DatabaseErrorFmt(SFieldValueError, [DisplayName]);
|
DatabaseErrorFmt(SFieldValueError, [DisplayName]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
with Value do
|
with AValue do
|
||||||
case VType of
|
case VType of
|
||||||
vtInteger:
|
vtInteger:
|
||||||
AsInteger := VInteger;
|
AsInteger := VInteger;
|
||||||
@ -785,24 +785,24 @@ begin
|
|||||||
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
|
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TField.SetDataset (Value : TDataset);
|
Procedure TField.SetDataset (AValue : TDataset);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef dsdebug}
|
{$ifdef dsdebug}
|
||||||
Writeln ('Setting dataset');
|
Writeln ('Setting dataset');
|
||||||
{$endif}
|
{$endif}
|
||||||
If Value=FDataset then exit;
|
If AValue=FDataset then exit;
|
||||||
If Assigned(FDataset) Then
|
If Assigned(FDataset) Then
|
||||||
begin
|
begin
|
||||||
FDataset.CheckInactive;
|
FDataset.CheckInactive;
|
||||||
FDataset.FFieldList.Remove(Self);
|
FDataset.FFieldList.Remove(Self);
|
||||||
end;
|
end;
|
||||||
If Assigned(Value) then
|
If Assigned(AValue) then
|
||||||
begin
|
begin
|
||||||
Value.CheckInactive;
|
AValue.CheckInactive;
|
||||||
Value.FFieldList.Add(Self);
|
AValue.FFieldList.Add(Self);
|
||||||
end;
|
end;
|
||||||
FDataset:=Value;
|
FDataset:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TField.SetDataType(AValue: TFieldType);
|
procedure TField.SetDataType(AValue: TFieldType);
|
||||||
|
@ -104,7 +104,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property ConnOptions: TConnOptions read FConnOptions;
|
property ConnOptions: TConnOptions read FConnOptions;
|
||||||
procedure ExecuteDirect(SQL : String); overload; virtual;
|
procedure ExecuteDirect(SQL : String); overload; virtual;
|
||||||
procedure ExecuteDirect(SQL : String; Transaction : TSQLTransaction); overload; virtual;
|
procedure ExecuteDirect(SQL : String; ATransaction : TSQLTransaction); overload; virtual;
|
||||||
procedure GetTableNames(List : TStrings; SystemTables : Boolean = false); virtual;
|
procedure GetTableNames(List : TStrings; SystemTables : Boolean = false); virtual;
|
||||||
procedure GetProcedureNames(List : TStrings); virtual;
|
procedure GetProcedureNames(List : TStrings); virtual;
|
||||||
procedure GetFieldNames(const TableName : string; List : TStrings); virtual;
|
procedure GetFieldNames(const TableName : string; List : TStrings); virtual;
|
||||||
@ -176,7 +176,7 @@ type
|
|||||||
// FSchemaInfo : TSchemaInfo;
|
// FSchemaInfo : TSchemaInfo;
|
||||||
|
|
||||||
procedure FreeFldBuffers;
|
procedure FreeFldBuffers;
|
||||||
procedure InitUpdates(SQL : string);
|
procedure InitUpdates(ASQL : string);
|
||||||
function GetIndexDefs : TIndexDefs;
|
function GetIndexDefs : TIndexDefs;
|
||||||
function GetStatementType : TStatementType;
|
function GetStatementType : TStatementType;
|
||||||
procedure SetIndexDefs(AValue : TIndexDefs);
|
procedure SetIndexDefs(AValue : TIndexDefs);
|
||||||
@ -187,7 +187,7 @@ type
|
|||||||
procedure OnChangeSQL(Sender : TObject);
|
procedure OnChangeSQL(Sender : TObject);
|
||||||
|
|
||||||
procedure Execute;
|
procedure Execute;
|
||||||
Procedure SQLParser(var SQL : string);
|
Procedure SQLParser(var ASQL : string);
|
||||||
procedure ApplyFilter;
|
procedure ApplyFilter;
|
||||||
Function AddFilter(SQLstr : string) : string;
|
Function AddFilter(SQLstr : string) : string;
|
||||||
protected
|
protected
|
||||||
@ -316,16 +316,16 @@ begin
|
|||||||
ExecuteDirect(SQL,FTransaction);
|
ExecuteDirect(SQL,FTransaction);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TSQLConnection.ExecuteDirect(SQL: String; Transaction : TSQLTransaction);
|
Procedure TSQLConnection.ExecuteDirect(SQL: String; ATransaction : TSQLTransaction);
|
||||||
|
|
||||||
var Cursor : TSQLCursor;
|
var Cursor : TSQLCursor;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not assigned(Transaction) then
|
if not assigned(ATransaction) then
|
||||||
DatabaseError(SErrTransactionnSet);
|
DatabaseError(SErrTransactionnSet);
|
||||||
|
|
||||||
if not Connected then Open;
|
if not Connected then Open;
|
||||||
if not Transaction.Active then Transaction.StartTransaction;
|
if not ATransaction.Active then ATransaction.StartTransaction;
|
||||||
|
|
||||||
try
|
try
|
||||||
Cursor := AllocateCursorHandle;
|
Cursor := AllocateCursorHandle;
|
||||||
@ -337,8 +337,8 @@ begin
|
|||||||
|
|
||||||
Cursor.FStatementType := stNone;
|
Cursor.FStatementType := stNone;
|
||||||
|
|
||||||
PrepareStatement(cursor,Transaction,SQL,Nil);
|
PrepareStatement(cursor,ATransaction,SQL,Nil);
|
||||||
execute(cursor,Transaction, Nil);
|
execute(cursor,ATransaction, Nil);
|
||||||
UnPrepareStatement(Cursor);
|
UnPrepareStatement(Cursor);
|
||||||
finally;
|
finally;
|
||||||
DeAllocateCursorHandle(Cursor);
|
DeAllocateCursorHandle(Cursor);
|
||||||
@ -721,7 +721,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSQLQuery.SQLParser(var SQL : string);
|
procedure TSQLQuery.SQLParser(var ASQL : string);
|
||||||
|
|
||||||
type TParsePart = (ppStart,ppSelect,ppWhere,ppFrom,ppOrder,ppComment,ppBogus);
|
type TParsePart = (ppStart,ppSelect,ppWhere,ppFrom,ppOrder,ppComment,ppBogus);
|
||||||
|
|
||||||
@ -733,7 +733,7 @@ Var
|
|||||||
StrLength : Integer;
|
StrLength : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
PSQL:=Pchar(SQL);
|
PSQL:=Pchar(ASQL);
|
||||||
ParsePart := ppStart;
|
ParsePart := ppStart;
|
||||||
|
|
||||||
CurrentP := PSQL-1;
|
CurrentP := PSQL-1;
|
||||||
@ -815,13 +815,13 @@ begin
|
|||||||
until CurrentP^=#0;
|
until CurrentP^=#0;
|
||||||
if (FWhereStartPos > 0) and (FWhereStopPos > 0) then
|
if (FWhereStartPos > 0) and (FWhereStopPos > 0) then
|
||||||
begin
|
begin
|
||||||
system.insert('(',SQL,FWhereStartPos+1);
|
system.insert('(',ASQL,FWhereStartPos+1);
|
||||||
inc(FWhereStopPos);
|
inc(FWhereStopPos);
|
||||||
system.insert(')',SQL,FWhereStopPos);
|
system.insert(')',ASQL,FWhereStopPos);
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSQLQuery.InitUpdates(SQL : string);
|
procedure TSQLQuery.InitUpdates(ASQL : string);
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -33,7 +33,7 @@ Type
|
|||||||
Constructor Create(AOWner : TSimpleIPCClient); override;
|
Constructor Create(AOWner : TSimpleIPCClient); override;
|
||||||
Procedure Connect; override;
|
Procedure Connect; override;
|
||||||
Procedure Disconnect; override;
|
Procedure Disconnect; override;
|
||||||
Procedure SendMessage(MsgType : TMessageType; Stream : TStream); override;
|
Procedure SendMessage(MsgType : TMessageType; AStream : TStream); override;
|
||||||
Function ServerRunning : Boolean; override;
|
Function ServerRunning : Boolean; override;
|
||||||
Property FileName : String Read FFileName;
|
Property FileName : String Read FFileName;
|
||||||
Property Stream : TFileStream Read FStream;
|
Property Stream : TFileStream Read FStream;
|
||||||
@ -67,7 +67,7 @@ begin
|
|||||||
FreeAndNil(FStream);
|
FreeAndNil(FStream);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPipeClientComm.SendMessage(MsgType : TMessagetype; Stream: TStream);
|
procedure TPipeClientComm.SendMessage(MsgType : TMessagetype; AStream: TStream);
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Hdr : TMsgHeader;
|
Hdr : TMsgHeader;
|
||||||
@ -76,9 +76,9 @@ Var
|
|||||||
begin
|
begin
|
||||||
Hdr.Version:=MsgVersion;
|
Hdr.Version:=MsgVersion;
|
||||||
Hdr.msgType:=mtString;
|
Hdr.msgType:=mtString;
|
||||||
Hdr.MsgLen:=Stream.Size;
|
Hdr.MsgLen:=AStream.Size;
|
||||||
FStream.WriteBuffer(hdr,SizeOf(hdr));
|
FStream.WriteBuffer(hdr,SizeOf(hdr));
|
||||||
FStream.CopyFrom(Stream,0);
|
FStream.CopyFrom(AStream,0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPipeClientComm.ServerRunning: Boolean;
|
function TPipeClientComm.ServerRunning: Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user