2002-02-05 21:22 UTC+0100 Tomaz Zupan <tomaz.zupan@orpo.si>

This commit is contained in:
Tomaz Zupan
2002-02-05 20:24:20 +00:00
parent de6e92e634
commit d12409f05b
4 changed files with 25 additions and 6 deletions

View File

@@ -7,6 +7,11 @@
For example:
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2002-02-08 22:45 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
* source/vm/runner.c
* Bug fixed, which caused GPF in case of using a call of undefined function
* include/hbextern.ch
* added definitions of new __hrb... functions for providing possibility
to call them from .hrb .
2002-02-07 20:48 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>

View File

@@ -8,9 +8,8 @@ C_SOURCES=\
odbc.c \
PRG_SOURCES=\
todbc.prg\
PRG_MAIN=testodbc.prg
LIBNAME=hbodbc
LIBS=\
include $(TOP)$(ROOT)config/bin.cf
include $(TOP)$(ROOT)config/lib.cf

View File

@@ -64,7 +64,10 @@
*
*/
#include <windows.h>
#if defined(HB_OS_WIN_32)
#include <windows.h>
#endif
#include <limits.h>
#include <malloc.h>
#include <math.h>
@@ -99,10 +102,18 @@ HB_FUNC( SQLDRIVERC ) /* HB_SQLDRIVERCONNECT( hDbc, @ cConnectString, lPrompt )
{
BYTE bBuffer1[ 1024 ];
SWORD wLen;
RETCODE ret = SQLDriverConnect( ( HDBC ) hb_parnl( 1 ),
#if defined(HB_OS_WIN_32)
RETCODE ret = SQLDriverConnect( ( HDBC ) hb_parnl( 1 ),
GetDesktopWindow(),
hb_parc( 2 ), strlen(hb_parc(2)),
bBuffer1, 1024, &wLen, SQL_DRIVER_COMPLETE ) ;
#elif defined(HB_OS_UNIX)
RETCODE ret = SQLDriverConnect( ( HDBC ) hb_parnl( 1 ),
0,
hb_parc( 2 ), strlen(hb_parc(2)),
bBuffer1, 1024, &wLen, SQL_DRIVER_COMPLETE ) ;
#endif
hb_storc( bBuffer1 , 3 );
hb_retni( ret );
}

View File

@@ -149,6 +149,7 @@ RETURN( "Error " + cErrorClass + " - " + cErrorMsg )
METHOD New( cODBCStr ) CLASS TODBC
LOCAL xBuf
LOCAL nRet
// WHILE .t.
::cODBCStr := cODBCStr
@@ -278,6 +279,9 @@ RETURN ( ( nRet == 0 ) )
// Only executes the SQL Statement
METHOD ExecSQL() CLASS TODBC
LOCAL lRet
LOCAL xBuf
LOCAL nRet
WHILE .T.