How can i to put a time out to the sp_OAMethod????

  • Hi friends i have this problem, i create a object of dll with the sp_OACreate

    , and i call a method of object with sp_OAMethod, but my dll sometimes it was freezed with some parameters , and the process must wait a lot of time to continue.

    so my question is ...

    exists some way to set a time out in the creation of method with the sp sp_OAMethod ???? or some way to set a time out?

    Thank you friends...

  • There is no way to set a timeout when calling sp_OAMethod. You could of course implement some kind of timeout mechanism in the method itself (possibly with a parameter to the method defining the timeout period).

  • Thanks, well it seems that only must be implement in the method itself, but i am seeking some trick to do it by sqlserver....mmm perhapas exists some trick to do a time out when the method is  called

    occurs i have a process of charge that is implemented into a DTS, well it uses a call to the DLL that it connects with a Oracle base, some register when use the call to Dll using SP_OACReate and SP_OAMethod, let the Dll freezed, so i want to skip that and continue with the other registers, so for skipping, i am seeking some way to do a timeout or something, well if no way to do it, the only way is to implement it in the method itself but i think that is better is do it by sqlserver ...

    Thanks brother.....

    sorry my bad english , i am practicing.....

  • i am seeking some way to do a timeout or something, well if no way to do it, the only way is to implement it in the method itself but i think that is better is do it by sqlserver

    Yep, it would be good to have it, but unless someone else has some other idea I think you are out of luck.

    sorry my bad english , i am practicing

    Hey, no problem at all. I am not a native English speaker myself so I know how it is. Just don't let it stop you from asking and/or answering, practice is the best way to go forward.

  • Master, my dll is registerd by component service manager, is posible to put a time out by the component service manager? i watch some option but i dont know if that option is for time of response of the dll or creation object??

    do you know if i can put a time out by component service manager??

  • It was quite some time since I worked with Component Services, so I cannot say for sure. There are two timeouts you can set. The first is for object creation time, but I assume that is only used with object pooling and is simply a timeout to wait for when waiting for an object in the pool to become available. The other is a transaction timeout period, and I suppose you might be able to use that. I have no idea about what the effects would be though.

    Personally I would rather have more control, perhaps by implementing the timeout in the method and returning some specific code when it occurs. Just letting the timeout elapse and hoping that sp_OA_method and SQL Server deals with it seems dangerous. Remember that objects created with and used by sp_OA_* procs are created in the MemToLeave area and memory leaks there is not something to take easily.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply