oVirtuale:ArrayToDBF( atempDbf, , nil, .t., .t. )
but oVirtuale not have the same structure of atempDbf
oVitruale init with
- Code: Select all Expand view
local aFields := { { "CONCORSO", "C", 3, 0 },;
{ "DATA", "D", 8, 0 },;
{ "BA1", "N", 2, 0 },;
{ "BA2", "N", 2, 0 },;
{ "BA3", "N", 2, 0 },;
{ "BA4", "N", 2, 0 },;
....
and atempDbf have
- Code: Select all Expand view
- local aFields := { { "NUMERO", "N", 6, 0 },;
{ "DATA", "D", 8, 0 },;
{ "CONCORSO", "C", 3, 0 },;
{ "BA1", "N", 2, 0 },;
{ "BA2", "N", 2, 0 },;
{ "BA3", "N", 2, 0 },;
{ "BA4", "N", 2, 0 },;
....
I used oVirtuale:ArrayToDBF( atempDbf, cItemFlds , nil, .t., .t. )
where cItemFlds is
- Code: Select all Expand view
- static cItemFlds :="CONCORSO,DATA,BA1,BA2,BA3,BA4,BA5,CA1,CA2,CA3,CA4,CA5,FI1,FI2,FI3,FI4,FI5,GE1,GE2,GE3,GE4,GE5,MI1,MI2,MI3,MI4,MI5,NA1,NA2,NA3,NA4,NA5,PA1,PA2,PA3,PA4,PA5,RM1,RM2,RM3,RM4,RM5,TO1,TO2,TO3,TO4,TO5,VE1,VE2,VE3,VE4,VE5,NZ1,NZ2,NZ3,NZ4,NZ5"
make me error on oVirtuale:ArrayToDBF( atempDbf, cItemFlds , nil, .t., .t. )
error
- Code: Select all Expand view
- Error description: Error DBFCDX/1021 Errore nella dimensione dei dati: BA1
Args:
[ 1] = N 100
Stack Calls
===========
Called from: .\source\classes\database.prg => FIELDPUT( 0 )
Called from: .\source\function\dbffunc2.prg => FW_ARRAYTODBF( 586 )
Called from: .\source\classes\database.prg => TDATABASE:HB_EXECFROMARRAY( 0 )
Called from: .\source\classes\database.prg => TDATABASE:ARRAYTODBF( 1637 )
Called from: Source\test.prg => LOAD_DBF( 584 )
Called from: Source\test.prg => ESTRAZIONE( 106 )
Called from: Source\test.prg => MAIN( 40 )
oLotto:gobottom()
xbrowser olotto TITLE "OLOTTO" ----> I see all ok
atempDbf:= oLotto:DbfToArray()
xbrowser atempDbf TITLE "ATEMPDBF" ---> I see all ok
oVirtuale:=TDatabase():Open( , cDir+"Virtuale", "DBFCDX", .T. )
oVirtuale:SetOrder( 0 )
oVirtuale:ArrayToDBF( atempDbf, cItemFlds , nil, .t., .t. ) ----> make error
oVirtuale:close()
Any solution pls