2009-05-20 23:32 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/rddsql/sddodbc/Makefile
! Applied logic from contrib/hbodbc/Makefile.
* contrib/rddsql/sddodbc/odbcdd.c
! Fixed three warnings (2 casts + 1 uninit var) with MSVC.
; TOFIX: These errors are shown when trying to compiler in UNICODE mode:
../../odbcdd.c(168) : error C2664: 'SQLDriverConnectW' : cannot convert parameter 3 from 'SQLCHAR *' to 'SQLWCHAR *'
../../odbcdd.c(204) : error C2664: 'SQLExecDirectW' : cannot convert parameter 2 from 'SQLCHAR *' to 'SQLWCHAR *'
../../odbcdd.c(239) : error C2664: 'SQLExecDirectW' : cannot convert parameter 2 from 'SQLCHAR *' to 'SQLWCHAR *'
../../odbcdd.c(263) : error C2664: 'SQLDescribeColW' : cannot convert parameter 3 from 'SQLCHAR *' to 'SQLWCHAR *'
This commit is contained in:
@@ -17,6 +17,19 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-20 23:32 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/rddsql/sddodbc/Makefile
|
||||
! Applied logic from contrib/hbodbc/Makefile.
|
||||
|
||||
* contrib/rddsql/sddodbc/odbcdd.c
|
||||
! Fixed three warnings (2 casts + 1 uninit var) with MSVC.
|
||||
|
||||
; TOFIX: These errors are shown when trying to compiler in UNICODE mode:
|
||||
../../odbcdd.c(168) : error C2664: 'SQLDriverConnectW' : cannot convert parameter 3 from 'SQLCHAR *' to 'SQLWCHAR *'
|
||||
../../odbcdd.c(204) : error C2664: 'SQLExecDirectW' : cannot convert parameter 2 from 'SQLCHAR *' to 'SQLWCHAR *'
|
||||
../../odbcdd.c(239) : error C2664: 'SQLExecDirectW' : cannot convert parameter 2 from 'SQLCHAR *' to 'SQLWCHAR *'
|
||||
../../odbcdd.c(263) : error C2664: 'SQLDescribeColW' : cannot convert parameter 3 from 'SQLCHAR *' to 'SQLWCHAR *'
|
||||
|
||||
2009-05-20 21:32 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* INSTALL
|
||||
+ Added typical ("FAQ") error message encountered with old,
|
||||
|
||||
@@ -6,6 +6,20 @@ ROOT = ../../../
|
||||
|
||||
LIBNAME=sddodbc
|
||||
|
||||
ifeq ($(HB_COMPILER),rsxnt)
|
||||
HB_WITHOUT_ODBC=yes
|
||||
endif
|
||||
ifeq ($(HB_ARCHITECTURE),dos)
|
||||
HB_WITHOUT_ODBC=yes
|
||||
endif
|
||||
ifeq ($(HB_ARCHITECTURE),os2)
|
||||
HB_WITHOUT_ODBC=yes
|
||||
endif
|
||||
|
||||
ifneq ($(HB_ARCHITECTURE),win)
|
||||
ifneq ($(HB_ARCHITECTURE),wce)
|
||||
ifeq ($(HB_WITHOUT_ODBC),)
|
||||
|
||||
ifeq ($(HB_INC_ODBC),)
|
||||
ifeq ($(HB_XBUILD),)
|
||||
HB_INC_ODBC = /usr/include /usr/local/include
|
||||
@@ -15,13 +29,22 @@ endif
|
||||
HB_INC_ODBC_OK += $(foreach d, $(HB_INC_ODBC), $(if $(wildcard $(d)/sql.h),$(d),))
|
||||
|
||||
ifneq ($(strip $(HB_INC_ODBC_OK)),)
|
||||
|
||||
HB_USER_CFLAGS += $(foreach d, $(HB_INC_ODBC_OK), -I$(d))
|
||||
else
|
||||
HB_WITHOUT_ODBC=yes
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(HB_WITHOUT_ODBC),yes)
|
||||
|
||||
C_SOURCES=\
|
||||
odbcdd.c \
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
|
||||
@@ -158,8 +158,14 @@ static HB_ERRCODE odbcConnect( SQLDDCONNECTION* pConnection, PHB_ITEM pItem )
|
||||
{
|
||||
cBuffer[ 0 ] ='\0';
|
||||
|
||||
if( SQL_SUCCEEDED( SQLDriverConnect( hConnect, NULL, ( SQLCHAR* ) hb_arrayGetCPtr( pItem, 2 ), hb_arrayGetCLen( pItem, 2 ),
|
||||
cBuffer, 1024, &iLen, SQL_DRIVER_NOPROMPT ) ) )
|
||||
if( SQL_SUCCEEDED( SQLDriverConnect( hConnect,
|
||||
NULL,
|
||||
( SQLCHAR* ) hb_arrayGetCPtr( pItem, 2 ),
|
||||
( SQLSMALLINT ) hb_arrayGetCLen( pItem, 2 ),
|
||||
cBuffer,
|
||||
HB_SIZEOFARRAY( cBuffer ),
|
||||
&iLen,
|
||||
SQL_DRIVER_NOPROMPT ) ) )
|
||||
{
|
||||
pConnection->hConnection = ( void* ) hConnect;
|
||||
pConnection->hCargo = ( void* ) hEnv;
|
||||
@@ -266,7 +272,7 @@ static HB_ERRCODE odbcOpen( SQLBASEAREAP pArea )
|
||||
pFieldInfo.atomName[ MAX_FIELD_NAME ] = '\0';
|
||||
hb_strUpper( (char *) pFieldInfo.atomName, MAX_FIELD_NAME + 1 );
|
||||
|
||||
pFieldInfo.uiLen = uiSize;
|
||||
pFieldInfo.uiLen = ( USHORT ) uiSize;
|
||||
pFieldInfo.uiDec = iDec;
|
||||
|
||||
/* HB_TRACE( HB_TR_ALWAYS, ("field: name=%s type=%d len=%d dec=%d null=%d", pFieldInfo.atomName, iDataType, uiSize, iDec, iNull ) ); */
|
||||
@@ -448,6 +454,7 @@ static HB_ERRCODE odbcGoTo( SQLBASEAREAP pArea, ULONG ulRecNo )
|
||||
pArray = hb_itemArrayNew( pArea->uiFieldCount );
|
||||
for ( ui = 1; ui <= pArea->uiFieldCount; ui++ )
|
||||
{
|
||||
iLen = SQL_NULL_DATA;
|
||||
pItem = NULL;
|
||||
res = 0;
|
||||
pField = pArea->lpFields + ui - 1;
|
||||
|
||||
Reference in New Issue
Block a user