From 266e156ff30f06ceb2e6d5182869f5fdaab617fc Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 4 Aug 2015 08:13:01 +0000 Subject: [PATCH] --- Merging r31035 into '.': U rtl/objpas/sysutils/datih.inc --- Recording mergeinfo for merge of r31035 into '.': U . --- Merging r31043 into '.': G rtl/objpas/sysutils/datih.inc --- Recording mergeinfo for merge of r31043 into '.': G . --- Merging r31225 into '.': U packages/fcl-db/src/sqldb/odbc/odbcconn.pas --- Recording mergeinfo for merge of r31225 into '.': G . # revisions: 31035,31043,31225 git-svn-id: branches/fixes_3_0@31268 - --- packages/fcl-db/src/sqldb/odbc/odbcconn.pas | 5 +++-- rtl/objpas/sysutils/datih.inc | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/fcl-db/src/sqldb/odbc/odbcconn.pas b/packages/fcl-db/src/sqldb/odbc/odbcconn.pas index 8645c0f53e..3175ffc06d 100644 --- a/packages/fcl-db/src/sqldb/odbc/odbcconn.pas +++ b/packages/fcl-db/src/sqldb/odbc/odbcconn.pas @@ -756,7 +756,7 @@ begin // prepare statement ODBCCursor.FQuery:=Buf; - if not (ODBCCursor.FSchemaType in [stTables, stSysTables, stColumns, stProcedures]) then + if not (ODBCCursor.FSchemaType in [stTables, stSysTables, stColumns, stProcedures, stIndexes]) then begin ODBCCheckResult( SQLPrepare(ODBCCursor.FSTMTHandle, PChar(buf), Length(buf)), @@ -854,6 +854,7 @@ begin stSysTables : Res:=SQLTables (ODBCCursor.FSTMTHandle, nil, 0, nil, 0, nil, 0, TABLE_TYPE_SYSTEM, length(TABLE_TYPE_SYSTEM) ); stColumns : Res:=SQLColumns(ODBCCursor.FSTMTHandle, nil, 0, nil, 0, @ODBCCursor.FQuery[1], length(ODBCCursor.FQuery), nil, 0 ); stProcedures: Res:=SQLProcedures(ODBCCursor.FSTMTHandle, nil, 0, nil, 0, nil, 0 ); + stIndexes : Res:=SQLStatistics(ODBCCursor.FSTMTHandle, nil, 0, nil, 0, @ODBCCursor.FQuery[1], length(ODBCCursor.FQuery), SQL_INDEX_ALL, SQL_QUICK); else Res:=SQLExecute(ODBCCursor.FSTMTHandle); //SQL_NO_DATA returns searched update or delete statement that does not affect any rows end; {case} @@ -1498,7 +1499,7 @@ end; function TODBCConnection.GetSchemaInfoSQL(SchemaType: TSchemaType; SchemaObjectName, SchemaObjectPattern: string): string; begin - if SchemaType in [stTables, stSysTables, stColumns, stProcedures] then + if SchemaType in [stTables, stSysTables, stColumns, stProcedures, stIndexes] then begin if SchemaObjectName<>'' then Result := SchemaObjectName diff --git a/rtl/objpas/sysutils/datih.inc b/rtl/objpas/sysutils/datih.inc index 151b43bcb2..c81f74030f 100644 --- a/rtl/objpas/sysutils/datih.inc +++ b/rtl/objpas/sysutils/datih.inc @@ -90,13 +90,17 @@ var type { windows isn't defined in 2.0.2 (FK) } -{$if not(defined(windows)) and not(defined(win32))} +{$if defined(windows) or defined(win32)} { Win32 reuses the struct from the Windows unit } +{$DEFINE HAS_SYSTEMTIME} +{$endif windows} + +{$IFNDEF HAS_SYSTEMTIME} TSystemTime = record Year, Month, Day, DayOfWeek: word; Hour, Minute, Second, MilliSecond: word; end ; -{$endif windows} +{$ENDIF} TTimeStamp = record Time: longint; { Number of milliseconds since midnight }