Custom Query (3933 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (427 - 429 of 3933)

Ticket Resolution Summary Owner Reporter
#3564 No Bug With ...EndWith not robust steve8tch
Description

Typical code block $q = some sql query $f_objOLEDynaset = $f_objOLESession.CreateDynaset($q, 0) With $f_objOLEDynaset

If $f_objOLEDynaset.RecordCount Then ; we have some results from the query

$Fields = $f_objOLEDynaset.Fields.Count ; check the number of field in the results set While Not $f_objOLEDynaset.EOF

; read values from results set

$f_objOLEDynaset.MoveNext

Wend

EndIF

WithEnd

I run code like this on 1000s of computers. This works for 99.99% of the time - but on some computers - I get the following error.

OIP-04099: Field not found Source: Oracle Automation at Line #: -1 Last DllError: 0 Help File: Context: 0 . To fix this error - I need to stop using With ..EndWith and just use the full dot path.

Is this expected ?

Thanks.

Steve

#3563 Fixed Function _IEBodyReadText() from IE.au3 needs to check .innerText is a valid property mLipok John.D.Rainbow@…
Description

To avoid this (albeit infrequent) problem:

Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText)
Return SetError($_IESTATUS_Success, 0, $oObject.document.body^ ERROR

which is related to function _IEBodyReadText() from IE.au3 the missing property checking (similar as done in other IE.au3 functions which need it) is respectfully asked to be included with the correction offered for this function as follows for your consideration please:

Func _IEBodyReadText(ByRef $oObject)
    If Not IsObj($oObject) Then
        __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidDataType")
        Return SetError($_IESTATUS_InvalidDataType, 1, 0)
    EndIf
    If Not __IEIsObjType($oObject, "browserdom") Then
        __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidObjectType", "Expected document element")
        Return SetError($_IESTATUS_InvalidObjectType, 1, 0)
    EndIf

    ;------------------------------------------------------------------------------------------
    ; Check to verify that the document body object has an innerText property, if not, skip trying to return its contents
    ;
    ; Setup internal error handler to Trap COM errors, turn off error notification,
    ;     check object property validity, set a flag and reset error handler and notification
    ;
    Local $bIsInnerText = True
    ; Trap COM errors and turn off error notification
    $bStatus = __IEInternalErrorHandlerRegister()
    If Not $bStatus Then __IEConsoleWriteError("Warning", "_IEBodyReadText", _
            "Cannot register internal error handler, cannot trap COM errors", _
            "Use _IEErrorHandlerRegister() to register a user error handler")
    ; Turn off error notification for internal processing
    $iNotifyStatus = _IEErrorNotify() ; save current error notify status
    _IEErrorNotify(False)

    ; Check conditions to verify that the property exists
    If $bIsInnerText Then
        $sTmp = $oObject.document.body.innerText ; Is .innerText a valid property?
        If @error Then $bIsInnerText = False
    EndIf

    ; restore error notify
    _IEErrorNotify($iNotifyStatus) ; restore notification status
    __IEInternalErrorHandlerDeRegister()
    ;------------------------------------------------------------------------------------------

    If $bIsInnerText Then   
        Return SetError($_IESTATUS_Success, 0, $oObject.document.body.innerText)
    Else
        __IEConsoleWriteError("Error", "_IEBodyReadText", "$_IESTATUS_InvalidObjectType", "Expected innerText element")
        Return SetError($_IESTATUS_InvalidObjectType, 1, 0)     
    EndIf
        
EndFunc   ;==>_IEBodyReadText

#3562 No Bug SetError fails if a function is called before returning TheDcoder <TheDcoder@…>
Description

Hello! I have discovered another somewhat frustrating bug. SetError fails if a function is called before returning. Here is an example:

#include <MsgBoxConstants.au3>

Example()

If @error Then
	ConsoleWrite("Error" & @CRLF)
Else
	ConsoleWrite("No Error" & @CRLF)
EndIf

Func Example()
	SetError(1)
	Sleep(1000)
EndFunc

Expected output is Error but the actual output is No Error which should be wrong as we have called SetError(1). If Sleep(1000) is removed then it works, this concludes that any error set using SetError will be erase if a function is called before returning!

Here is some more proof that the bug only occurs when using statements which call a function:

#include <MsgBoxConstants.au3>

Example()

If @error Then
	ConsoleWrite("Error" & @CRLF)
Else
	ConsoleWrite("No Error" & @CRLF)
EndIf

Func Example()
	SetError(1)
	Local $iNumber = @SEC
	If $iNumber * 1000 <= 1000 Then $iNumber = 0
EndFunc

This snippet will output Error as expected.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.