Buenas, seria bueno quitar todo referente a Fivewin, para que sea más fácil compilar.
Por ejemplo,
#ifndef __XHARBOUR__
#xcommand TRY => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
#xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
#xcommand FINALLY => ALWAYS
#define UR_FI_FLAGS 6
#define UR_FI_STEP 7
#define UR_FI_SIZE 5 // by Lucas for Harbour
#endif
function cValToChar( u ); return CStr( u )
function MsgInfo( u ) ; return Alert( u )
function MsgAlert( u ); return Alert( u )
function cFilePath( cPathMask ) // returns path of a filename
local n := RAt( "\", cPathMask ), cDisk
return If( n > 0, Upper( Left( cPathMask, n ) ),;
( cDisk := cFileDisc( cPathMask ) ) + If( ! Empty( cDisk ), "\", "" ) )
function cFileNoPath( cPathMask )
local n := RAt( "\", cPathMask )
return If( n > 0 .and. n < Len( cPathMask ),;
Right( cPathMask, Len( cPathMask ) - n ),;
If( ( n := At( ":", cPathMask ) ) > 0,;
Right( cPathMask, Len( cPathMask ) - n ),;
cPathMask ) )
function cFileNoExt( cPathMask ) // returns the filename without ext
local cName := AllTrim( cFileNoPath( cPathMask ) )
local n := RAt( ".", cName )
return AllTrim( If( n > 0, Left( cName, n - 1 ), cName ) )
function cFileDisc( cPathMask ) // returns drive of the path
return If( At( ":", cPathMask ) == 2, ;
Upper( Left( cPathMask, 2 ) ), "" )
#pragma BEGINDUMP
#include <hbapi.h>
HB_FUNC( LAND )
{
hb_retl( ( hb_parnl( 1 ) & hb_parnl( 2 ) ) != 0 );
}
#pragma ENDDUMP
Lucas, con harbour, en la linea 1621
IF TABLES_WITH_FIELD_HB_RECNO
//create ado index only with adUseClient
IF oRecordSet:CursorLocation = adUseClient
oRecordSet:Fields( oRecordSet:Fields:Count -1 ):Properties("Optimize") := 1 // AQUI CASCA!!
ENDIF
ENDIF
Esto es lo que suelta, de momento
c:\adotest>hbmk2 test.hbm
Harbour 3.2.0dev (r1411121701)
Copyright (c) 1999-2014, http://harbour-project.org/
Compiling 'test.prg'...
Lines 377, Functions/Procedures 1
Generating C source output to 'C:\Users\rafa\AppData\Local\Temp\hbmk_st8wdm.dir\test.c'... Done.
Compiling 'adordd.prg'...
adordd.prg(1621) Error E0022 Invalid lvalue ':'
Mi hbmk que uso;
hbblink.hbc
hbwin.hbc
-lxhb -lgtwin -lgtwvg -lgtgui -lhbwin -lhbmisc -lhbxpp -lhbct
-ic:/programacion/harbour3/include;c:\programacion\harbour32\contrib\xhb
-otest
-w0
-es1
-mt
test.prg
adordd.prg
De todas maneras, no funciona el test que me has enviado...
C:\adotest>test
Error WINOLE/1007 No se pudo encontrar el archivo 'C:\programacion\pms\adordd\test2.mdb'. (0x80004005ft JET Database Engine (DOS Error -2147352567)
Called from TOLEAUTO:OPEN(0)
Called from ADO_OPEN(232)
Called from DBUSEAREA(0)
Called from MAIN(18)
Miraré por que no lo crea...
Saludos Cordiales