I am using FWH 9.06. I have found the following errors in Xbrowse when associated with Recordsets.
1) In line no.5971, Method ToCalc() is trying to make a call to CopyFromRecordSet(). I understand that OpenOffice Calc does not support this function. This function is only supported by Excel and there is no equivalent function in OpenOffice Calc. XBrowse errors out at this line. This function is called only when the xBrowse condition "Len( aCols ) == ::oRs:Fields:Count()" is evaluated as .T., otherwise xbrowse uses the regular ClipBoard copy/paste method to transfer the xBrowse contents to Calc/Excel and it may work if the recordset does not contain a numeric column.
I tried to by pass this error by adding an extra column to the recordset, so that the condition "Len( aCols ) == ::oRs:Fields:Count()" is evaluated to .F. and xBrowse tries to use ClipBoard copy/paste method. But then another problem rises ie, if the recordset contains numeric column, it errors out at line 9405 ie
RetVal := AllTrim( Eval( ::bStrData ) ) // Alltrim will generate error.
I found that the same problem exists in the Method To Excel() when the CopyFromRecordSet() is not utilised to transfer xBrowse data contents to Excel. XBrowse will not use CopyFromRecordSet() when the xBrowse displayed columns and RecordSet FieldCount() differs
For testing purpose you can recreate the error by following the below given steps
1. Create a record set containing a numeric column
For eg. Name, Salary, Address. Salary should be a numeric column
2. Make xBrowse to display only column 1 and 2 ie Name & Salary.
3. Try to call ToExcel()
I understand that xBrowse expects the bStrData to be of character type and it tries to do Alltrim() (Line 9405) and StrTran() in the Method ClpRow() Line No. 5155 and errors out when the bStrData type is not of a character type
Any help is appreciated.
Regards
Anser