Hello,
With ADORDD and Harbour there is a problem with emtpy dates.
When issuing an append blank, putting a ctod('') fails.
Also, FW_DateToSQL( , "D" ) fails too.
As I workarround, I set to date(), but there are some cases I need an emty date().
This is the code:
Thank you.
With ADORDD and Harbour there is a problem with emtpy dates.
When issuing an append blank, putting a ctod('') fails.
Also, FW_DateToSQL( , "D" ) fails too.
As I workarround, I set to date(), but there are some cases I need an emty date().
This is the code:
aStruct := ADOSTRUCT( oRs )
FOR n := 1 TO LEN( aStruct )
IF aStruct[ n, 6 ]
AADD( aCols, aStruct[ n, 1 ] )
AADD( aVals, HB_DECODE( aStruct[ n, 2 ], 'C', Space( aStruct[ n, 3 ] ), 'D', FW_DateToSQL( , "D" ), 'L', .f., ;
'M', "", 'm', "", '+', 0, ;
'N', If( aStruct[ n, 3 ] == 0, 0, Val( "0." + Replicate( '0', aStruct[ n, 3 ] ) ) ), ;
'T', CTOT( '' ), '' ) )
ENDIF
NEXT
oRs:AddNew( aCols, aVals )
oRs:Update()Thank you.
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.