Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Switch to,Retry" message while using MTS

Status
Not open for further replies.

renga

Programmer
Jul 17, 2001
5
0
0
CA
Hi
I am using VB6 and Oracle as database. Middle layer is MTS. Whenever the system runs complex queries or large amount of data has to be accessed, User get a message
"Swith to or Retry".
user has to press retry for couple of times, then gets the output.
It doesn't do in all options. Only when the report becomes really big or query is too complicated.
User is willing to wait for few more miniutes. But this message bugs him.
How to avoid this message? System should automatically do the retry until the MTS component returns the value.
Anybody expreienced this problem? How to solvet it?


Renga
 
hi, there. I was wondering if someone has answered to your posting? I'm experiencing a similar problem.
 
hi,
i think its a coding problem....while coding a component pl take some precautions and u will not get any problem...

1. Dont pass object reference as parameter.....use byval and pass the parameters as value....
2.dont pass collections as a parameters......
3.release all the objects in the end.....memory leakage...
4.always use createobject for creating the instance....and new for the packages not registered on the MTS...like ADODB
5.while calling a different class always use createinstance for creating the instance...

thats all
 
Thanks for the reply. I have done all these things. I don't have the problem always. Only when I run a complex queries in MTS component which takes more response time and if the user clicks on the screen we get this message.
"Switch to, Retry".
User is willing to wait if he sees some progress bar or any activity bar. I couldn't update progress bar values once the control is transfered. Timer doesn't work.
Status bar and vbhourglass are not enough . Is there any way to display a progress bar or nice graphical stuuff while we call MTS component?
If you know please help me.

Renga

 
Thx for your suggestion kamalsawhney.

My problem is slightly different compare to renga. My app doesn't involve complex queries. In fact, it involves 2 simple select queries. Anyway, here a description of my problem:

=================================
I've a client app that's an ActiveX EXE. Another app (let's call it APP3) passes an id to my ActiveX EXE, and the ActiveX EXE would call an MTS component to fetch some data from the SQL Server and pass the data back to the ActiveX EXE. The EXE uses the data to populate a form and show it. Simple enough.

The ActiveX EXE is installed on workstations (> 50), but about 10 - 20 workstations uses it at different time. The EXE works fine for about 10 - 15 days, and one day for no apparent reason, when APP3 tried to call the EXE, it displayed a server busy dialog box (with "Switch To" and "Retry" buttons). If I tried to open up MTS Explore on the server, I couldn't. It's wouldn't open up. SQL Server was also not responding (Enterprise Manager and ISQLW wouldn't run). I had to reboot the server. As soon as I rebooted the server, I could open up MTS Explorer. When I checked the status view of the component that the EXE calls, I could see "Objects", "Activated", and "In Call" columns all had "21" in them. They were not going away. I had to shut down the package to clear it. After I cleared it, my ActiveX EXE worked fine again. However, after 10 - 15 days, the same problem would happen again. This morning, we found out one of the hard drives (RAID) on the server was faulty because the firmware on it needs to be updated. I don't if that would have anything to do with my problem. (This finding was found last week. Actually, a few days after this finding, that particular drive failed completed, and we lost some data.)
=============================================

1. Dont pass object reference as parameter.....use byval and pass the parameters as value....

mkuan: I don't have object to pass.

2.dont pass collections as a parameters......

mkuan: I don't have this too.

3.release all the objects in the end.....memory leakage...

mkuan: checked.

4.always use createobject for creating the instance....and new for the packages not registered on the MTS...like ADODB

mkuan: Done this.

5.while calling a different class always use createinstance for creating the instance...

mkuan: n/a.


Min
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top