oReservation:=TDatabase():Open( , cDbfPath+"Reserva", "DBFCDX", .T. )
oReservation:setorder(1)
cFilter := "trim(TYPE) == '" + AllTrim( cTypeRoom ) +;
"' .and. num== '" + AllTrim(str(nElemento)) +;
"' .and. '"+ dtoc(dDataIniziale)+"'<= dtoc(CHECK_OUT)"+;
" .and. '"+ dtoc(dDataFinale)+"'=> dtoc(CHECK_IN)"
oReservation:setFilter(cFilter)
oReservation:gotop()
xbrowser oReservation
the original was
SET FILTER TO AllTrim( RE->TYPE ) == AllTrim( cTypeRoom ) .and. RE->NUM = nElemento ;
.AND. ( dDataIniziale <= RE->CHECK_OUT .AND. dDataFinale >= RE->CHECK_IN )
RE->(DbGoTop())
give me this error
- Code: Select all Expand view RUN
- Application
===========
Path and name: C:\Work\Errori\image_su_btnbmp\test2.Exe (32 bits)
Size: 3,953,152 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 19.03
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 23-04-2019, 19:09:38
Error description: Error BASE/1449 Syntax error: &
Args:
[ 1] = C {||trim(TYPE) == '01' .and. num== '1' .and. '01-07-2018'<= dtoc(CHECK_OUT) .and. '07-08-2018'=> dtoc(CHECK_IN)}
Stack Calls
===========
Called from: .\source\classes\DATABASE.PRG => COMPILE( 1133 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:SETFILTER( 1351 )
Someone can Help me pls