diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 5c160462..8802bb2c 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1598,7 +1598,7 @@ begin Delete(DataType, 1, MatchLen); end; - if (MatchLen = 0) and (FParameters.NetTypeGroup = ngPgSQL) then begin + if MatchLen = 0 then begin // Fall back to unknown type Result := Datatypes[0]; rx.Expression := '^(\S+)'; @@ -5824,6 +5824,8 @@ begin TypeIndex := dtTime; ftDateTime: TypeIndex := dtDateTime; + //ftTimeStampOffset: // this is NOT data type DATETIMEOFFSET + // TypeIndex := dtDatetime; else raise EDatabaseError.CreateFmt(_('Unknown data type for column #%d - %s: %d'), [i, FColumnNames[i], Integer(LastResult.Fields[i].DataType)]); end; diff --git a/source/mysql_structures.pas b/source/mysql_structures.pas index 9c186c03..b729ee04 100644 --- a/source/mysql_structures.pas +++ b/source/mysql_structures.pas @@ -347,8 +347,20 @@ var ); // MySQL Data Type List and Properties - MySQLDatatypes: array [0..36] of TDBDatatype = + MySQLDatatypes: array [0..37] of TDBDatatype = ( + ( + Index: dtUnknown; + NativeTypes: '99999'; + Name: 'UNKNOWN'; + Description: 'Unknown data type'; + HasLength: False; + RequiresLength: False; + HasBinary: False; + HasDefault: False; + LoadPart: False; + Category: dtcOther; + ), ( Index: dtTinyint; NativeType: mytTiny; @@ -948,8 +960,20 @@ var ); - MSSQLDatatypes: array [0..31] of TDBDatatype = + MSSQLDatatypes: array [0..32] of TDBDatatype = ( + ( + Index: dtUnknown; + NativeTypes: '99999'; + Name: 'UNKNOWN'; + Description: 'Unknown data type'; + HasLength: False; + RequiresLength: False; + HasBinary: False; + HasDefault: False; + LoadPart: False; + Category: dtcOther; + ), ( Index: dtTinyint; Name: 'TINYINT';