Opened 9 years ago
Closed 9 years ago
#3564 closed Bug (No Bug)
With ...EndWith not robust
| Reported by: | steve8tch | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.14.2 | Severity: | None |
| Keywords: | Cc: |
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
Attachments (0)
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Please post in the forum and seek help rather than deciding unilaterally that the problem is an AutoIt bug. The fact it "works for 99.99% of the time" makes it very likely to be an environmental issue and not an AutoIt problem.
M23

The above error message did not capture the single quote marks - hopefully I have done a better job below.
You can see in the log snippet below - the result set has 3 columns and 19 rows.
In this case -- using the With ... WithEnd statements - I got error reading from the result set.
Since using the full dot path to the object - this type of error has stopped.
Thanks.
Steve