Hi.
I'm using ADO.au3 in my script for inserting rows from website to Oracle:
...
; SetUP internal ADO.au3 UDF COMError Handler
_ADO_ComErrorHandler_UserFunction(_ADO_COMErrorHandler)
...
For $x=0 To UBound($arez) - 1
$sSQL = "insert into mytab_oper values(to_date('" & $arez[$x][0] & "','DD.MM.YYYY HH24:MI')," & _
"'" & StringStripWS($arez[$x][1],1) & "'," & _
"'" & StringStripWS($arez[$x][2],1) & "'," & _
"to_date('" & $arez[$x][3] & "','DD.MM.YYYY')," & _
"to_number('" & StringStripWS($arez[$x][4],8) & "')," & _
"'" & StringRegExpReplace(StringStripWS($arez[$x][5],1),"'","''") & "'," & _
"to_number('" & StringStripWS($arez[$x][6],8) & "')," & _
"'" & StringRegExpReplace(StringStripWS($arez[$x][7],1),"'","''") & "'," & _
"to_number('" & StringRegExpReplace($arez[$x][8],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][9],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][10],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][11],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][12],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][13],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][14],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][15],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][16],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][17],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][18],",",".") & "')," & _
"to_number('" & StringRegExpReplace($arez[$x][19],",",".") & "')," & _
"'" & StringStripWS($arez[$x][20],1) & "')"
;ConsoleWrite('$sSQL = '&$sSQL & @CRLF)
_ADO_Execute($oConnection, $sSQL)
Next
...
and receive an error message:
###############################
ADO.au3 v.2.1.13 BETA (1155) : ==> COM Error intercepted !
$oADO_Error.description is: [Oracle][ODBC][Ora]ORA-01438: value larger than specified precision allowed for this column
$oADO_Error.windescription: Ошибка.
$oADO_Error.number is: 80020009
$oADO_Error.lastdllerror is: 0
$oADO_Error.scriptline is: 1155
$oADO_Error.source is: Microsoft OLE DB Provider for ODBC Drivers
$oADO_Error.helpfile is:
$oADO_Error.helpcontext is: 0
###############################
How do I display only the description of an error, ie, value $ oADO_Error.description in a log file, or at least in a variable?