Browse Source

* Raise error on unknown datatypes and adds support for ftbcd params.
Patch by Ludo Brands, Mantis #21611.

git-svn-id: trunk@20677 -

marco 13 years ago
parent
commit
71e20b1b59
1 changed files with 6 additions and 3 deletions
  1. 6 3
      packages/fcl-db/src/sqldb/oracle/oracleconnection.pp

+ 6 - 3
packages/fcl-db/src/sqldb/oracle/oracleconnection.pp

@@ -533,8 +533,9 @@ begin
           ftFloat : begin OFieldType := SQLT_FLT; OFieldSize := sizeof(double); end;
           ftDate, ftDateTime : begin OFieldType := SQLT_DAT; OFieldSize := 7; end;
           ftString  : begin OFieldType := SQLT_STR; OFieldSize := 4000; end;
-          ftFMTBcd : begin OFieldType := SQLT_VNU; OFieldSize := 22; end;
-
+          ftFMTBcd,ftBCD : begin OFieldType := SQLT_VNU; OFieldSize := 22; end;
+        else
+          DatabaseErrorFmt(SUnsupportedParameter,[Fieldtypenames[AParams[tel].DataType]],self);
         end;
         parambuffers[tel].buffer := getmem(OFieldSize);
         parambuffers[tel].Len := OFieldSize;
@@ -602,9 +603,11 @@ begin
                             pb[5] := 1;
                             pb[6] := 1;
                             end;
-        ftFmtBCD          : begin
+        ftFmtBCD,ftBCD    : begin
                             FmtBCD2Nvu(asFmtBCD,parambuffers[SQLVarNr].buffer);
                             end;
+        else
+          DatabaseErrorFmt(SUnsupportedParameter,[DataType],self);
       end;
 
       end;