by Otto » Fri Jul 24, 2020 10:40 am
Hello,
The screenshot shows code with placeholders that are patched.
To use HARBOURINO makes sense if you prepare TEMPLATES.
Then you can develop standard tasks very fast.
In the code section is the pure mod harbour code.
Best regards,
Otto
- Code: Select all Expand view
cStatus="ready"
use ( hb_GetEnv( "PRGPATH" ) + "\data\faq.dbf" ) new
do while .not. eof()
if field->status = cStatus
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_ID" ) )
if LEN( ALLTRIM( field->ID ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ID" ] = ALLTRIM( field->ID )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ID" ] = ALLTRIM( CONVERTUMLAUTE ( field->ID ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_QUESTION" ) )
if LEN( ALLTRIM( field->QUESTION ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_QUESTION" ] = ALLTRIM( field->QUESTION )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_QUESTION" ] = ALLTRIM( CONVERTUMLAUTE ( field->QUESTION ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_ANSWER" ) )
if LEN( ALLTRIM( field->ANSWER ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ANSWER" ] = ALLTRIM( field->ANSWER )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_ANSWER" ] = ALLTRIM( CONVERTUMLAUTE ( field->ANSWER ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_STATUS" ) )
if LEN( ALLTRIM( field->STATUS ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_STATUS" ] = ALLTRIM( field->STATUS )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_STATUS" ] = ALLTRIM( CONVERTUMLAUTE ( field->STATUS ) )
endif
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_DATE" ) )
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_DATE" ] = dtoc( field->DATE )
AADD( aRelationship_DBF, ( "REC" + "_" + ALLTRIM( STR( recno() ) ) + "_TEXT" ) )
if LEN( ALLTRIM( field->TEXT ) ) = 0
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_TEXT" ] = ALLTRIM( field->TEXT )
else
hHash_DBF[ "REC" + "_" + ALLTRIM( STR( recno() ) ) +"_TEXT" ] = ALLTRIM( CONVERTUMLAUTE ( field->TEXT ) )
endif
endif
select faq
skip
enddo
select faq
use
TEMPLATE PARAMS hHash_DBF
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club********************************************************************