Page 1 of 1

DC_Querybuild syntax

Posted: Wed Feb 24, 2016 7:20 am
by Victorio
Hi,

I have used this function in program. I have this as universal filter to filtering database.
How can I put to browse field own description to select browse table ?
In table for select fields is column Field description, Field name, field type, field len..."

I want change Field description to not see same field name but write here own description, for example
Field description Field name...
Telephone number PHONENUM
Street STR
Town TWN...


I see in source, that DC_QueryBuild has 4 parameters
cQueryExpr,cQueryName,cField, aFieldItems.

What is aFieldItems ? This parameter is for filtering in array only ?

I do not understand, how structure has aFieldItems.

Re: DC_Querybuild syntax

Posted: Wed Feb 24, 2016 12:34 pm
by Victorio
I examine put parameter as aray own field description, but error here :

LOCAL fd[10]
fd[1]="1 field"
fd[2]="2 field"
fd[3]="3 field"
fd[4]="4 field"
fd[5]="5 field"...

and then :

cQuery := DC_QueryBuild_sk(cQuery,,,fd)
...

Program stop with erron in this row in DC_QueryBuild()

ELSE
FOR i := 1 TO LEN(aFieldItems)
IF Len(aFieldItems) < 8
ASize(aFieldItems,8) **** here
ENDIF
NEXT
ENDIF
..

error is some like wrong data type error (now I have not modify source at home, because this stay in business PC)


I want change own description here :

DCSETPARENT TO oDCQUERY_BROW_FIELDS
DCBROWSECOL ELEMENT DCFLD_DESC WIDTH 15 HEADER 'Field Description' **** here
DCBROWSECOL ELEMENT DCFLD_NAME WIDTH 7 HEADER 'Field Name'
DCBROWSECOL ELEMENT DCFLD_TYPE WIDTH 3 HEADER 'Type'
DCBROWSECOL ELEMENT DCFLD_LEN WIDTH 3 HEADER 'Len'
DCBROWSECOL ELEMENT DCFLD_DEC WIDTH 3 HEADER 'Dec'