- Code: Select all Expand view
do case
case nWheel = 1
r1:= "BA1"
r2:= "BA2"
r3:= "BA3"
r4:= "BA4"
r5:= "BA5"
case .....
Endcase
oDbf:= TDatabase():Open( , cDir+"demo", "DBFCDX", .T. )
Do case
Case nPos=1
oDbf:CreateIndex( , , oDbf:&r1, .f., .f., .t. )
Case nPos=2
oDbf:CreateIndex( , , oDbf:&r2, .f., .f., .t. )
Case nPos=3
oDbf:CreateIndex( , , oDbf:&r3, .f., .f., .t. )
Case nPos=4
oDbf:CreateIndex( , , oDbf:&r4, .f., .f., .t. )
Case nPos=5
oDbf:CreateIndex( , , oDbf:&r5, .f., .f., .t. )
Endcase
oDbf:gotop()
Why not run and make error ?
why make error ?
I tried also with
- Code: Select all Expand view
- oDbf:= TDatabase():Open( , cDir+"demo", "DBFCDX", .T. )
Do case
Case nPos=1
oDbf:CreateIndex( cDir+"demo", "TMP", oDbf:&r1, .f., .f., .t. )
Case nPos=2
oDbf:CreateIndex( cDir+"demo", "TMP", oDbf:&r2, .f., .f., .t. )
Case nPos=3
oDbf:CreateIndex( cDir+"demo", "TMP", oDbf:&r3, .f., .f., .t. )
Case nPos=4
oDbf:CreateIndex( cDir+"demo", "TMP", oDbf:&r4, .f., .f., .t. )
Case nPos=5
oDbf:CreateIndex( cDir+"demo", "TMP", oDbf:&r5, .f., .f., .t. )
Endcase
oDbf:gotop()
make this error
- Code: Select all Expand view
- Error description: Error BASE/1081 Parametro errato: +
Args:
[ 1] = C {||
[ 2] = N 0
Stack Calls
===========
Called from: .\source\classes\DATABASE.PRG => COMPILE( 1293 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:TD_CREATEINDEX( 2439 )
Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE( 135 )
Called from: .\source\classes\DATABASE.PRG => TDATABASE:CREATEINDEX( 0 )
i tried also with
- Code: Select all Expand view
- Do case
Case nPos=1
cNewIndex :=oFrequenti:&r1
Case nPos=2
cNewIndex :=oFrequenti:&r2
Case nPos=3
cNewIndex :=oFrequenti:&r3
Case nPos=4
cNewIndex :=oFrequenti:&r4
Case nPos=5
cNewIndex :=oFrequenti:&r5
Endcase
oFrequenti:CreateIndex( "demo", "TMP", cNewIndex, .f., .f., .t. )
same error
Any help pls