Sarosh,
>Shouldn't that (oConnection.Close() etc.) and other release resources type stuff be in the finally block?Well, it typically all depends on what you're doing I suppose. In this particular case, Michel was simply reporting the error in his catch. Since the DataAdapter.Fill() command is supposed to automatically close the connection when it's done, it's not necessary to have one in a finally block also, only when something goes wrong with the .Fill().
~~Bonnie
>Hi!
>
>Shouldn't that (oConnection.Close() etc.) and other release resources type stuff be in the finally block?
>
>Sarosh
>
>
>>Cool! Glad it worked! =)
>>
>>~~Bonnie
>>
>>
>>>>Probably all you need to do is to just make sure you close your connection in your catch:
>>>>
>>>> Catch loError As Exception
>>>> oApp.cError = oApp.ErrorSetup(loError, oApp.Debug(cSQL))
>>>> oConnection.Close()
>>>> End Try
>>>>
>>>
>>>Wow! That did it.
>>>
>>>I have found that this got locked for a few minutes and went away by itself. So, once an error occured, the lock was persisting for a few minutes. Now, with this adjustment, it never happens. Thanks