Question

Locked

Run-time error 80040e05

By k.adityakiran ·
Hi,

Can any one tell me what is wrong with the following code snippet:

I am getting the Run-time error '-2147217915 (80040e05'; Object Was Open when I run the VB script containing this code. This is the part of the code which throws error, because I have a statement to write to log file before this and the code works fine till there:

oradb = New ADODB.Connection
oradb.CursorLocation = ADODB.CursorLocationEnum.adUseClient
oradb.Open("Provider=MSDASQL;DSN=" & sDSN & ";UID=" & sOraUserId & ";PWD=" & sOraPwd)
sqlstring = "select * from siebel.EIM_ACCOUNT where IF_ROW_BATCH_NUM = '" & sBatchNumber & "'"
rsEIM = New ADODB.Recordset
rsEIM.Open(sqlstring, oradb, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockOptimistic)

Please help.

Regards,
Aditya

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

This code makes no sense

by Slayer_ In reply to Run-time error 80040e05

I can't tell what language your using, cant be VB6 or VBScript as its missing parts required for both languages.

And most of it doesn't make sense, example.

oradb = New ADODB.Connection

Would never work, missing keyword "set" for VB6 or VBScript.

you are also using a variable you did not declare, "option explicit" should be specified to prevent this issue.

Collapse -

Thanks

by k.adityakiran In reply to This code makes no sense
Collapse -

Here are some error codes for you to look at......

by Peconet Tietokoneet In reply to Run-time error 80040e05
Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums