mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:29:33 +02:00
--- Merging r32931 into '.':
U packages/fcl-db/src/sqldb/mysql/mysqlconn.inc --- Recording mergeinfo for merge of r32931 into '.': U . --- Merging r32964 into '.': U packages/fcl-db/src/datadict/fpdatadict.pp --- Recording mergeinfo for merge of r32964 into '.': G . --- Merging r33049 into '.': U packages/fcl-db/src/base/dsparams.inc --- Recording mergeinfo for merge of r33049 into '.': G . --- Merging r33078 into '.': U packages/fcl-db/src/sqldb/sqldb.pp --- Recording mergeinfo for merge of r33078 into '.': G . --- Merging r33079 into '.': G packages/fcl-db/src/sqldb/sqldb.pp --- Recording mergeinfo for merge of r33079 into '.': G . --- Merging r33080 into '.': U packages/fcl-db/tests/sqldbtoolsunit.pas --- Recording mergeinfo for merge of r33080 into '.': G . --- Merging r33085 into '.': U packages/fcl-db/src/base/dataset.inc U packages/fcl-db/src/dbase/dbf.pas --- Recording mergeinfo for merge of r33085 into '.': G . --- Merging r33086 into '.': U packages/fcl-db/src/dbase/dbf_common.inc --- Recording mergeinfo for merge of r33086 into '.': G . --- Merging r33087 into '.': U packages/fcl-db/src/datadict/fpddsqldb.pp --- Recording mergeinfo for merge of r33087 into '.': G . # revisions: 32931,32964,33049,33078,33079,33080,33085,33086,33087 git-svn-id: branches/fixes_3_0@33372 -
This commit is contained in:
parent
c76c86e598
commit
fcbc1fd615
@ -1028,7 +1028,7 @@ end;
|
||||
|
||||
procedure TDataSet.InternalPost;
|
||||
|
||||
Procedure Checkrequired;
|
||||
Procedure CheckRequiredFields;
|
||||
|
||||
Var I : longint;
|
||||
|
||||
@ -1042,7 +1042,7 @@ procedure TDataSet.InternalPost;
|
||||
end;
|
||||
|
||||
begin
|
||||
Checkrequired;
|
||||
CheckRequiredFields;
|
||||
end;
|
||||
|
||||
procedure TDataSet.InternalSetToRecord(Buffer: TRecordBuffer);
|
||||
|
@ -1104,7 +1104,7 @@ Var
|
||||
|
||||
begin
|
||||
SetLength(Temp,ASize);
|
||||
Move(Buffer^,Temp,ASize);
|
||||
Move(Buffer^,Temp[1],ASize);
|
||||
AsBlob:=Temp;
|
||||
end;
|
||||
|
||||
|
@ -2844,7 +2844,7 @@ begin
|
||||
WriteString(ASection,KeyCaseInsFields,CaseInsFields);
|
||||
WriteString(ASection,KeyDescFields,DescFields);
|
||||
WriteString(ASection,KeySource,Source);
|
||||
O:=Integer(Options);
|
||||
O:=Integer(self.Options);
|
||||
T:=TypeInfo(TIndexOptions);
|
||||
WriteString(ASection,KeyOptions,SetToString(T,O,False));
|
||||
end;
|
||||
|
@ -232,8 +232,8 @@ begin
|
||||
Q.SQL.text:=Format('SELECT * FROM %s WHERE (1=2)',[ATableName]);
|
||||
Q.ReadOnly:=False;
|
||||
Q.Prepare;
|
||||
Q.IndexDefs.Update;
|
||||
IndexDefsToDDIndexDefs(Q.IndexDefs,Defs);
|
||||
Q.ServerIndexDefs.Update;
|
||||
IndexDefsToDDIndexDefs(Q.ServerIndexDefs,Defs);
|
||||
Result:=Defs.Count;
|
||||
finally
|
||||
Q.Free;
|
||||
|
@ -1428,6 +1428,8 @@ var
|
||||
pRecord: pDbfRecord;
|
||||
I, newRecord: Integer;
|
||||
begin
|
||||
// check required fields
|
||||
inherited;
|
||||
// if internalpost is called, we know we are active
|
||||
pRecord := pDbfRecord(ActiveBuffer);
|
||||
// commit blobs
|
||||
|
@ -222,14 +222,7 @@
|
||||
{$define SUPPORT_VARIANTS}
|
||||
{$define SUPPORT_SEPARATE_VARIANTS_UNIT}
|
||||
{$define SUPPORT_REFRESHEVENTS}
|
||||
|
||||
// FPC 2.0.x improvements
|
||||
// todo: add a $IF FPC_FULLVERSION>=20000 for support for future FPC 3+
|
||||
{$ifdef VER2}
|
||||
{$ifndef VER2_0_0}
|
||||
{$define SUPPORT_BACKWARD_FIELDDATA}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$define SUPPORT_BACKWARD_FIELDDATA}
|
||||
|
||||
// FPC 1.0.x exceptions: no 0/0 support
|
||||
{$ifdef VER1_0}
|
||||
|
@ -106,7 +106,7 @@ Type
|
||||
|
||||
TConnectionName = class (TSQLConnection)
|
||||
private
|
||||
FSkipLibrarVersionCheck : Boolean;
|
||||
FSkipLibraryVersionCheck : Boolean;
|
||||
FHostInfo: String;
|
||||
FServerInfo: String;
|
||||
FMySQL : PMySQL;
|
||||
@ -165,7 +165,7 @@ Type
|
||||
property ClientInfo: string read GetClientInfo;
|
||||
property ServerStatus : String read GetServerStatus;
|
||||
published
|
||||
Property SkipLibrarVersionCheck : Boolean Read FSkipLibrarVersionCheck Write FSkipLibrarVersionCheck;
|
||||
Property SkipLibraryVersionCheck : Boolean Read FSkipLibraryVersionCheck Write FSkipLibraryVersionCheck;
|
||||
property DatabaseName;
|
||||
property HostName;
|
||||
property KeepConnection;
|
||||
@ -497,7 +497,7 @@ var
|
||||
FullVersion: string;
|
||||
begin
|
||||
InitialiseMysql;
|
||||
if not SkipLibrarVersionCheck then
|
||||
if not SkipLibraryVersionCheck then
|
||||
begin
|
||||
FullVersion:=strpas(mysql_get_client_info());
|
||||
// Version string should start with version number:
|
||||
|
@ -819,31 +819,6 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TSqlObjectIdentifierList }
|
||||
|
||||
function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
|
||||
begin
|
||||
Result := Items[Index] as TSqlObjectIdenfier;
|
||||
end;
|
||||
|
||||
procedure TSqlObjectIdentifierList.SetIdentifier(Index: integer; AValue: TSqlObjectIdenfier);
|
||||
begin
|
||||
Items[Index] := AValue;
|
||||
end;
|
||||
|
||||
function TSqlObjectIdentifierList.AddIdentifier: TSqlObjectIdenfier;
|
||||
begin
|
||||
Result:=Add as TSqlObjectIdenfier;
|
||||
end;
|
||||
|
||||
function TSqlObjectIdentifierList.AddIdentifier(Const AObjectName: String;
|
||||
Const ASchemaName: String = ''): TSqlObjectIdenfier;
|
||||
begin
|
||||
Result:=AddIdentifier();
|
||||
Result.SchemaName:=ASchemaName;
|
||||
Result.ObjectName:=AObjectName;
|
||||
end;
|
||||
|
||||
{ TSQLDBFieldDefs }
|
||||
|
||||
class function TSQLDBFieldDefs.FieldDefClass: TFieldDefClass;
|
||||
@ -1298,10 +1273,13 @@ begin
|
||||
If LogEvent(detPrepare) then
|
||||
Log(detPrepare,SQL);
|
||||
PrepareStatement(Cursor,ATransaction,SQL,Nil);
|
||||
If LogEvent(detExecute) then
|
||||
Log(detExecute,SQL);
|
||||
Execute(Cursor,ATransaction, Nil);
|
||||
UnPrepareStatement(Cursor);
|
||||
try
|
||||
If LogEvent(detExecute) then
|
||||
Log(detExecute,SQL);
|
||||
Execute(Cursor,ATransaction, Nil);
|
||||
finally
|
||||
UnPrepareStatement(Cursor);
|
||||
end;
|
||||
finally;
|
||||
DeAllocateCursorHandle(Cursor);
|
||||
end;
|
||||
@ -3647,6 +3625,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TSqlObjectIdenfier }
|
||||
|
||||
constructor TSqlObjectIdenfier.Create(ACollection: TSqlObjectIdentifierList;
|
||||
@ -3657,6 +3636,32 @@ begin
|
||||
FObjectName:=AObjectName;
|
||||
end;
|
||||
|
||||
{ TSqlObjectIdentifierList }
|
||||
|
||||
function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
|
||||
begin
|
||||
Result := Items[Index] as TSqlObjectIdenfier;
|
||||
end;
|
||||
|
||||
procedure TSqlObjectIdentifierList.SetIdentifier(Index: integer; AValue: TSqlObjectIdenfier);
|
||||
begin
|
||||
Items[Index] := AValue;
|
||||
end;
|
||||
|
||||
function TSqlObjectIdentifierList.AddIdentifier: TSqlObjectIdenfier;
|
||||
begin
|
||||
Result:=Add as TSqlObjectIdenfier;
|
||||
end;
|
||||
|
||||
function TSqlObjectIdentifierList.AddIdentifier(Const AObjectName: String;
|
||||
Const ASchemaName: String = ''): TSqlObjectIdenfier;
|
||||
begin
|
||||
Result:=AddIdentifier();
|
||||
Result.SchemaName:=ASchemaName;
|
||||
Result.ObjectName:=AObjectName;
|
||||
end;
|
||||
|
||||
|
||||
Initialization
|
||||
|
||||
Finalization
|
||||
|
@ -184,10 +184,9 @@ begin
|
||||
{$ENDIF Win64}
|
||||
MSSQL: Fconnection := TMSSQLConnection.Create(nil);
|
||||
SYBASE: Fconnection := TSybaseConnection.Create(nil);
|
||||
else writeln('Invalid database type, check if a valid database type for your achitecture was provided in the file ''database.ini''');
|
||||
end;
|
||||
|
||||
if not assigned(Fconnection) then writeln('Invalid database type, check if a valid database type for your achitecture was provided in the file ''database.ini''');
|
||||
|
||||
FTransaction := TSQLTransaction.Create(nil);
|
||||
|
||||
with Fconnection do
|
||||
|
Loading…
Reference in New Issue
Block a user