Run-time error 80040e05 - TechRepublic
Question
June 4, 2009 at 02:51 PM
k.adityakiran

Run-time error 80040e05

by k.adityakiran . Updated 17 years, 1 month ago

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 discussion is locked

All Comments