time out on createobject

Is there a time out on createobject or cocreateinstance call?

If yes, how do I change the time out parameter.

I have a case that vb initiate my object using createobject. However, my object requires at least 4 min to initialize. That will cause the createobject call some kind of timeout.

?->
LVL 26
EDDYKTAsked:
Who is Participating?
 
p_biggelaarConnect With a Mentor Commented:
I'm afraid I only have a partial answer. Yes there is something like a time-out. It also depends on what you try to do, but you can count on a timout after about 2 minutes. Unfortunately I can't tell you what you can do about it.
0
 
Éric MoreauSenior .Net ConsultantCommented:
Have you check these properties:
    App.OleServerBusyTimeout
    App.OleRequestPendingTimeout
0
 
EDDYKTAuthor Commented:
To emoreau,

I did but those doesn't seem to be it.
It is because by default OLeserverbusytimeout is 10 second and olerequestpendingtimeout is 5 second.

the timeout on createobject is at least 90 second.

?->
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
kskourtisCommented:
You can set either of these timeouts to very large values, because they are stored as Longs. For example, 86,400,000 milliseconds is a day, which is equivalent to an infinite timeout.

Plus you can have VB raise an error, which you can handle in your code.
Check out for details
http://support.microsoft.com/support/kb/articles/Q138/0/66.asp
0
 
EDDYKTAuthor Commented:
Kskourtis,

I don't think this is what I want.

I did try this values, but there is no effect on createobject.


?->
0
 
EDDYKTAuthor Commented:
?-<
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.