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