bug FW_DBFTOEXCEL

bug FW_DBFTOEXCEL

Postby MOISES » Thu Jul 09, 2015 10:16 am

Hello,

I get this error:

Error description: (DOS Error -2147352567) WINOLE/1006 (0x800A03EC): _VALUE
Args:
[ 1] = A { ... }

Stack Calls
===========
Called from: => TOLEAUTO:_VALUE( 0 )
Called from: .\source\classes\DATABASE.PRG => (b)FW_DBFTOEXCEL( 1431 )
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FW_DBFTOEXCEL

Postby MOISES » Thu Jul 09, 2015 10:31 am

Hello,

I think the problem is related to empty dates.
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FW_DBFTOEXCEL

Postby hmpaquito » Thu Jul 09, 2015 11:52 am

Sí el error puede estar relacionado con fechas vacias.

http://fivetechsupport.com/forums/viewt ... 50#p169487


Parece que la solucion que dieron al problema en:
https://groups.google.com/forum/#!searc ... g4tZJLxQsJ

es esta:
oExcelSheet:Cells( 1, 1 ):Value := iif( Empty( dMyDate ), NIL, dMyDate )
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: bug FW_DBFTOEXCEL

Postby MOISES » Thu Jul 09, 2015 2:30 pm

Hello,

Thank you. The problem is the function uses an Array:


if Empty( cFieldList )
cFieldList := ""
AEval( DbStruct(), { |a| cFieldList += "," + a[ 1 ] } )
cFieldList := Substr( cFieldList, 2 )
endif
aHead := HB_ATokens( cFieldList, "," )
nCols := Len( aHead )


bLine := &( "{||{" + cFieldList + "}}" )


DbEval( { || oRange:Rows( nRow ):Value := Eval( bLine ), nRow++ }, bFor, bWhile, nNext, nRec, lRest )
Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
MOISES
 
Posts: 838
Joined: Wed Aug 22, 2007 10:09 am

Re: bug FW_DBFTOEXCEL

Postby nageswaragunupudi » Fri Jul 10, 2015 1:12 am

Exporting by rows is a lot faster than exporting cell by cell.
We can extend the codeblock to scan for empty dates and substituting with nulls. But this again defeats the main purpose of speed. When I first made this function it was working for empty dates also correctly with xHarbour. I think sometime back Harbour also made some changes regarding empty dates.

Anyway I need to check this once again and see what to do.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10313
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 32 guests