2010-05-24 19:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/sddoci/sddoci.c
    ! Attempting to fix wrong numeric size for plain 'NUMERIC'
      (without size) type. I'm guessing so I'd appreciate if
      someone could dive into this more deeply.

  * utils/hbmk2/hbmk2.prg
    * Minor.

  * package/winuni/RELNOTES
    + Added OCILIB.

  * contrib/sddoci/sddoci.hbc
  * contrib/sddoci/sddoci.c
  * contrib/sddoci/Makefile
    * Changes to follow OCILIB 3.6.0
This commit is contained in:
Viktor Szakats
2010-05-24 17:53:40 +00:00
parent e8aec4dff4
commit 6409c1dcb9
6 changed files with 40 additions and 26 deletions

View File

@@ -17,6 +17,23 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-24 19:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/sddoci/sddoci.c
! Attempting to fix wrong numeric size for plain 'NUMERIC'
(without size) type. I'm guessing so I'd appreciate if
someone could dive into this more deeply.
* utils/hbmk2/hbmk2.prg
* Minor.
* package/winuni/RELNOTES
+ Added OCILIB.
* contrib/sddoci/sddoci.hbc
* contrib/sddoci/sddoci.c
* contrib/sddoci/Makefile
* Changes to follow OCILIB 3.6.0
2010-05-24 18:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/examples/plug_moc.prg

View File

@@ -31,8 +31,8 @@ ifneq ($(HB_HAS_OCILIB),)
ifeq ($(HB_COMPILER),bcc)
HB_CFLAGS += -DOCI_API=_stdcall
endif
ifneq ($(HB_WITH_OCILIB_UNICODE),)
HB_CFLAGS += -DOCI_CHARSET_UNICODE
ifneq ($(HB_WITH_OCILIB_WIDE),)
HB_CFLAGS += -DOCI_CHARSET_UNICODE -DOCI_CHARSET_WIDE
else ifneq ($(HB_WITH_OCILIB_MIXED),)
HB_CFLAGS += -DOCI_CHARSET_MIXED
endif

View File

@@ -62,7 +62,7 @@
#include <ocilib.h>
#if defined( OCI_CHARSET_UNICODE )
#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_WIDE )
#define M_HB_ARRAYGETSTR( arr, n, phstr, plen ) hb_arrayGetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, phstr, plen )
#define M_HB_ITEMCOPYSTR( itm, str, len ) hb_itemCopyStrU16( itm, HB_CDP_ENDIAN_NATIVE, str, len )
#define M_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStrU16( itm, HB_CDP_ENDIAN_NATIVE, phstr, plen )
@@ -78,7 +78,7 @@
#define M_HB_CHAR char
#endif
#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_MIXED )
#if defined( OCI_CHARSET_UNICODE ) || defined( OCI_CHARSET_WIDE ) || defined( OCI_CHARSET_MIXED )
#define D_HB_ARRAYGETSTR( arr, n, phstr, plen ) hb_arrayGetStrU16( arr, n, HB_CDP_ENDIAN_NATIVE, phstr, plen )
#define D_HB_ITEMCOPYSTR( itm, str, len ) hb_itemCopyStrU16( itm, HB_CDP_ENDIAN_NATIVE, str, len )
#define D_HB_ITEMGETSTR( itm, phstr, plen ) hb_itemGetStrU16( itm, HB_CDP_ENDIAN_NATIVE, phstr, plen )
@@ -390,8 +390,13 @@ static HB_ERRCODE ocilibOpen( SQLBASEAREAP pArea )
case OCI_CDT_NUMERIC:
pFieldInfo.uiType = HB_FT_LONG;
pFieldInfo.uiLen = ( HB_USHORT ) OCI_ColumnGetPrecision( col );
pFieldInfo.uiDec = ( HB_USHORT ) OCI_ColumnGetScale( col );
/* For plain 'NUMERIC', precision is zero and scale is -127 */
if( OCI_ColumnGetPrecision( col ) > 0 )
pFieldInfo.uiLen = ( HB_USHORT ) OCI_ColumnGetPrecision( col );
if( OCI_ColumnGetScale( col ) >= 0 )
pFieldInfo.uiDec = ( HB_USHORT ) OCI_ColumnGetScale( col );
else
pFieldInfo.uiDec = ( HB_USHORT ) hb_setGetDecimals();
break;
case OCI_CDT_LONG:

View File

@@ -3,8 +3,8 @@
#
libs=sddoci
{HB_WITH_OCILIB_UNICODE}libs=ocilibw
{HB_WITH_OCILIB_WIDE}libs=ocilibw
{HB_WITH_OCILIB_MIXED}libs=ocilibm
{!HB_WITH_OCILIB_UNICODE&!HB_WITH_OCILIB_MIXED}libs=ociliba
{!HB_WITH_OCILIB_WIDE&!HB_WITH_OCILIB_MIXED}libs=ociliba
libs=../rddsql/rddsql.hbc

View File

@@ -63,6 +63,7 @@ Tool/lib versions used to create this package:
FreeImage 3.13.0
GD 2.0.35
MySQL 5.1.41
OCILIB 3.6.0
OpenSSL 1.0.0
PostgreSQL 8.4.2-1
QT 4.6.2

View File

@@ -6015,34 +6015,25 @@ STATIC FUNCTION PlugIn_Execute( hbmk, cState )
RETURN NIL
STATIC FUNCTION hbmk_ErrorMessage( oError )
// start error message
/* start error message */
LOCAL cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " "
// add subsystem name if available
IF ISCHARACTER( oError:subsystem )
cMessage += oError:subsystem()
ELSE
cMessage += "???"
ENDIF
/* add subsystem name if available */
cMessage += iif( ISCHARACTER( oError:subsystem ), oError:subsystem(), "???" )
// add subsystem's error code if available
IF ISNUMBER( oError:subCode )
cMessage += "/" + hb_NToS( oError:subCode )
ELSE
cMessage += "/???"
ENDIF
/* add subsystem's error code if available */
cMessage += "/" + iif( ISNUMBER( oError:subCode ), hb_ntos( oError:subCode ), "???" )
// add error description if available
/* add error description if available */
IF ISCHARACTER( oError:description )
cMessage += " " + oError:description
ENDIF
// add either filename or operation
/* add either filename or operation */
DO CASE
CASE !Empty( oError:filename )
CASE ! Empty( oError:filename )
cMessage += ": " + oError:filename
CASE !Empty( oError:operation )
CASE ! Empty( oError:operation )
cMessage += ": " + oError:operation
ENDCASE