mORMot and Open Source friends
Check-in [0405d6e3fb]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixed issue with SQLT_IBFLOAT/SQLT_IBDOUBLE kind of columns
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0405d6e3fbd26ccd7ed42075beba78bc5eed1c35
User & Date: ab 2012-08-31 15:22:20
Context
2012-08-31
15:27
fixed missing ColumnType := ftDouble for SQLT_IBFLOAT/SQLT_IBDOUBLE kind of column check-in: daece25705 user: ab tags: trunk
15:22
fixed issue with SQLT_IBFLOAT/SQLT_IBDOUBLE kind of columns check-in: 0405d6e3fb user: ab tags: trunk
14:48
TSQLRecord.Create/FillPrepare/CreateAndFillPrepare and TSQLRest.OneFieldValue/MultiFieldValues methods signature BREAKING CHANGE: array of const used to be ParamsSQLWhere and expecting '%' in the FormatSQLWhere statement, is now called BoundsSQLWhere, and expects bound parameters specified as '?' in the FormatSQLWhere statement - this is less confusing for new users, and more close to the usual way of preparing database queries; but your existing user code SHALL BE CHECKED and fixed check-in: 82b9e305dd user: ab tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SynDBOracle.pas.

57
58
59
60
61
62
63

64
65
66
67
68
69
70
...
779
780
781
782
783
784
785


786
787
788
789
790
791
792
....
2379
2380
2381
2382
2383
2384
2385
2386

2387
2388
2389
2390
2391
2392
2393
  - now NLS_LANG environnement variable or current thread local will be used by
    TSQLDBOracleConnectionProperties.Create if supplied code page parameter is 0
  - now TSQLDBOracleConnectionProperties.Create constructor can be used directly
  - previous TSQLDBOracleConnectionProperties reintroduced constructor renamed
    CreateWithCodePage, to specify the code page to be used
  - fixed issue with SQL requests containing '' and parameters
  - fixed issue with SQLT_BIN/RAW kind of columns

  - fixed issue with CLOB/NCLOB/NVARCHAR kind of columns (including charset)
  - added TSQLDBOracleStatement.ColumnToVarData() overriden method, for faster
    process from mORMot external tables (i.e. SQLite3DB)
  - fixed issue with TDateTime parameter (SQLT_DAT replaced by SQLT_TIMESTAMP)
  - fixed issue with NULL parameter (avoid ORA-01024 error)
  - fixed random issue when converting a SQLT_DATE result column value
  - force ftCurrency content to be returned with '.' as decimal separator (as
................................................................................
  _SQLT_PLI = 29;
  SQLT_UIN = 68;
  SQLT_SLS = 91;
  SQLT_LVC = 94;
  SQLT_LVB = 95;
  SQLT_AFC = 96;
  SQLT_AVC = 97;


  SQLT_CUR = 102;
  SQLT_RDD = 104;
  SQLT_LAB = 105;
  SQLT_OSL = 106;
  SQLT_NTY = 108;
  SQLT_REF = 110;
  SQLT_CLOB = 112;
................................................................................
            HasLOB := true;
          end;
          SQLT_RID, SQLT_RDD: begin
            ColumnType := ftUTF8;
            ColumnValueDBType := SQLT_STR; // null-terminated string
            ColumnValueDBSize := 24; // 24 will fit 8 bytes alignment
          end;
          SQLT_VNU, SQLT_FLT, SQLT_BFLOAT, SQLT_BDOUBLE: begin

            ColumnValueDBType := SQLT_BDOUBLE;
            ColumnValueDBSize := sizeof(Double);
          end;
          SQLT_NUM: begin
            oScale:= 5; // OCI_ATTR_PRECISION is always 38 (on Oracle 11g) :(
            AttrGet(oHandle,OCI_DTYPE_PARAM,@oScale,nil,OCI_ATTR_SCALE,fError);
            ColumnValueDBSize := sizeof(Double);






>







 







>
>







 







|
>







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
....
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
  - now NLS_LANG environnement variable or current thread local will be used by
    TSQLDBOracleConnectionProperties.Create if supplied code page parameter is 0
  - now TSQLDBOracleConnectionProperties.Create constructor can be used directly
  - previous TSQLDBOracleConnectionProperties reintroduced constructor renamed
    CreateWithCodePage, to specify the code page to be used
  - fixed issue with SQL requests containing '' and parameters
  - fixed issue with SQLT_BIN/RAW kind of columns
  - fixed issue with SQLT_IBFLOAT/SQLT_IBDOUBLE kind of columns
  - fixed issue with CLOB/NCLOB/NVARCHAR kind of columns (including charset)
  - added TSQLDBOracleStatement.ColumnToVarData() overriden method, for faster
    process from mORMot external tables (i.e. SQLite3DB)
  - fixed issue with TDateTime parameter (SQLT_DAT replaced by SQLT_TIMESTAMP)
  - fixed issue with NULL parameter (avoid ORA-01024 error)
  - fixed random issue when converting a SQLT_DATE result column value
  - force ftCurrency content to be returned with '.' as decimal separator (as
................................................................................
  _SQLT_PLI = 29;
  SQLT_UIN = 68;
  SQLT_SLS = 91;
  SQLT_LVC = 94;
  SQLT_LVB = 95;
  SQLT_AFC = 96;
  SQLT_AVC = 97;
  SQLT_IBFLOAT = 100;
  SQLT_IBDOUBLE = 101;
  SQLT_CUR = 102;
  SQLT_RDD = 104;
  SQLT_LAB = 105;
  SQLT_OSL = 106;
  SQLT_NTY = 108;
  SQLT_REF = 110;
  SQLT_CLOB = 112;
................................................................................
            HasLOB := true;
          end;
          SQLT_RID, SQLT_RDD: begin
            ColumnType := ftUTF8;
            ColumnValueDBType := SQLT_STR; // null-terminated string
            ColumnValueDBSize := 24; // 24 will fit 8 bytes alignment
          end;
          SQLT_VNU, SQLT_FLT, SQLT_BFLOAT, SQLT_BDOUBLE,
          SQLT_IBFLOAT, SQLT_IBDOUBLE: begin
            ColumnValueDBType := SQLT_BDOUBLE;
            ColumnValueDBSize := sizeof(Double);
          end;
          SQLT_NUM: begin
            oScale:= 5; // OCI_ATTR_PRECISION is always 38 (on Oracle 11g) :(
            AttrGet(oHandle,OCI_DTYPE_PARAM,@oScale,nil,OCI_ATTR_SCALE,fError);
            ColumnValueDBSize := sizeof(Double);