2008-08-13 04:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbodbc/odbc.c
! Some recently updated code now conditionally restored
to pre-ODBC 3.0 versions to support compilers (namely
__DMC__) with old ODBC headers. I couldn't find out
how to point DMC to newer (SDK) ODBC headers, but as
soon as we do, we can remove this workaround.
There is a similar problem with MSVC6.
This commit is contained in:
@@ -8,6 +8,15 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-08-13 04:16 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbodbc/odbc.c
|
||||
! Some recently updated code now conditionally restored
|
||||
to pre-ODBC 3.0 versions to support compilers (namely
|
||||
__DMC__) with old ODBC headers. I couldn't find out
|
||||
how to point DMC to newer (SDK) ODBC headers, but as
|
||||
soon as we do, we can remove this workaround.
|
||||
There is a similar problem with MSVC6.
|
||||
|
||||
2008-08-13 03:08 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/gtwvt/gtwvt.c
|
||||
! Fixed one possible minor bug (synced from gtwvg.c),
|
||||
|
||||
@@ -511,22 +511,35 @@ HB_FUNC( SQLGETINFO ) /* hDbc, nType, @cResult */
|
||||
|
||||
HB_FUNC( SQLSETCONNECTOPTION ) /* hDbc, nOption, uOption */
|
||||
{
|
||||
#if (ODBCVER >= 0x0300)
|
||||
hb_retni( SQLSetConnectAttr( ( SQLHDBC ) hb_parptr( 1 ),
|
||||
( SQLINTEGER ) hb_parnl( 2 ),
|
||||
ISCHAR( 3 ) ? ( SQLPOINTER ) hb_parcx( 3 ) : ( SQLPOINTER ) hb_parnl( 3 ),
|
||||
ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) );
|
||||
#else
|
||||
hb_retni( SQLSetConnectOption( ( HDBC ) hb_parptr( 1 ),
|
||||
( UWORD ) hb_parnl( 2 ),
|
||||
( UDWORD ) ISCHAR( 3 ) ? ( LONG ) hb_parcx( 3 ) : hb_parnl( 3 ) ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLSETSTMTOPTION ) /* hStmt, nOption, uOption ) --> nRetCode */
|
||||
{
|
||||
#if (ODBCVER >= 0x0300)
|
||||
hb_retni( SQLSetStmtAttr( ( SQLHSTMT ) hb_parptr( 1 ),
|
||||
( SQLINTEGER ) hb_parnl( 2 ),
|
||||
ISCHAR( 3 ) ? ( SQLPOINTER ) hb_parcx( 3 ) : ( SQLPOINTER ) hb_parnl( 3 ),
|
||||
ISCHAR( 3 ) ? ( SQLINTEGER ) hb_parclen( 3 ) : ( SQLINTEGER ) SQL_IS_INTEGER ) );
|
||||
#else
|
||||
hb_retni( SQLSetStmtOption( ( SQLHSTMT ) hb_parptr( 1 ),
|
||||
( UWORD ) hb_parnl( 2 ),
|
||||
( UDWORD ) ISCHAR( 3 ) ? ( LONG ) hb_parcx( 3 ) : hb_parnl( 3 ) ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLGETCONNECTOPTION ) /* hDbc, nOption, @cOption */
|
||||
{
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLPOINTER buffer[ 512 ];
|
||||
SQLINTEGER len;
|
||||
SQLRETURN result = SQLGetConnectAttr( ( SQLHDBC ) hb_parptr( 1 ),
|
||||
@@ -536,10 +549,18 @@ HB_FUNC( SQLGETCONNECTOPTION ) /* hDbc, nOption, @cOption */
|
||||
&len );
|
||||
hb_storclen( result == SQL_SUCCESS ? ( char * ) buffer : NULL, len, 3 );
|
||||
hb_retni( result );
|
||||
#else
|
||||
BYTE bBuffer[ 512 ];
|
||||
WORD result = SQLGetConnectOption( ( HDBC ) hb_parptr( 1 ), hb_parni( 2 ), bBuffer );
|
||||
|
||||
hb_storclen( result == SQL_SUCCESS ? ( char * ) bBuffer : NULL, sizeof( bBuffer ), 3 );
|
||||
hb_retni( result );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLGETSTMTOPTION ) /* hStmt, nOption, @cOption */
|
||||
{
|
||||
#if (ODBCVER >= 0x0300)
|
||||
SQLPOINTER buffer[ 512 ];
|
||||
SQLINTEGER len;
|
||||
SQLRETURN result = SQLGetStmtAttr( ( SQLHSTMT ) hb_parptr( 1 ),
|
||||
@@ -550,6 +571,13 @@ HB_FUNC( SQLGETSTMTOPTION ) /* hStmt, nOption, @cOption */
|
||||
|
||||
hb_storclen( result == SQL_SUCCESS ? ( char * ) buffer : NULL, len, 3 );
|
||||
hb_retni( result );
|
||||
#else
|
||||
BYTE bBuffer[ 512 ];
|
||||
WORD result = SQLGetStmtOption( ( SQLHSTMT ) hb_parptr( 1 ), hb_parni( 2 ), bBuffer );
|
||||
|
||||
hb_storclen( result == SQL_SUCCESS ? ( char * ) bBuffer : NULL, sizeof( bBuffer ), 3 );
|
||||
hb_retni( result );
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_FUNC( SQLCOMMIT ) /* hEnv, hDbc */
|
||||
|
||||
Reference in New Issue
Block a user