Modify

Opened 3 years ago

Closed 3 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 Changed 3 years ago by anonymous

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

2017/09/01 07:43:22:354 :Fields.Count :3
2017/09/01 07:43:22:404 :Exception occurred.
-2147352567
OIP-04099: Field '' not found
Source: 	Oracle Automation
at Line #: -1	Last DllError: 	0
Help File: 		Context: 	0
2017/09/01 07:43:22:414 :Exception occurred.
-2147352567
OIP-04099: Field '' not found
Source: 	Oracle Automation
at Line #: -1	Last DllError: 	0
Help File: 		Context: 	0
2017/09/01 07:43:22:414 :Exception occurred.
-2147352567
OIP-04099: Field '' not found
Source: 	Oracle Automation
at Line #: -1	Last DllError: 	0
Help File: 		Context: 	0
2017/09/01 07:43:22:414 :Exception occurred.
-2147352567
OIP-04099: Field '' not found
Source: 	Oracle Automation
at Line #: -1	Last DllError: 	0
Help File: 		Context: 	0
2017/09/01 07:43:22:414 :Exception occurred.
-2147352567
OIP-04099: Field '' not found
Source: 	Oracle Automation
at Line #: -1	Last DllError: 	0
Help File: 		Context: 	0
2017/09/01 07:43:22:414 :Return from query :19 rows of data

comment:2 Changed 3 years ago by Melba23

  • Resolution set to No Bug
  • Status changed from new to 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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.