I wish create a dbf from array
oVirtuale:ArrayToDBF( atempDbf, , nil, .t., .t. )
but oVirtuale not have the same structure of atempDbf
oVitruale init with
and atempDbf have
I used oVirtuale:ArrayToDBF( atempDbf, cItemFlds , nil, .t., .t. )
where cItemFlds is
make me error on oVirtuale:ArrayToDBF( atempDbf, cItemFlds , nil, .t., .t. )
error
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
oVirtuale:ArrayToDBF( atempDbf, , nil, .t., .t. )
but oVirtuale not have the same structure of atempDbf
oVitruale init with
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
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 },;
....where cItemFlds is
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"error
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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com