473,385 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

asynchronous com+ calls

Hi!

i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...

anyone has any ideas how to implement it? or just a guideline maybe?

thank you

Sep 11 '06 #1
4 2176
Are you trying to use the asynchronous ability that COM+ proxies expose,
or do you just want to make an asynchronous call in general? If the answer
is the latter, why not just run the call on another thread? Or better yet,
create a delegate with the same signature and then make the call to your
proxy, using the IAsyncResult returned from the async call on the delegate.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi!

i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...

anyone has any ideas how to implement it? or just a guideline maybe?

thank you

Sep 11 '06 #2
Nicholas

if i use delegates, can i get specific data back to the calling thread
(like with sinchronous calls), or do i just get something like "method
executed correctly" information? and could you perhaps point me to some
more documentation on that subject (delegates and iasync) if its not
too much of a problem

thanks
Nicholas Paldino [.NET/C# MVP] wrote:
Are you trying to use the asynchronous ability that COM+ proxies expose,
or do you just want to make an asynchronous call in general? If the answer
is the latter, why not just run the call on another thread? Or better yet,
create a delegate with the same signature and then make the call to your
proxy, using the IAsyncResult returned from the async call on the delegate.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi!

i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...

anyone has any ideas how to implement it? or just a guideline maybe?

thank you
Sep 11 '06 #3
6954,

Take a look at the IAsyncResult interface. There should be
documentation there on how you would get a result from the async call when
you are done.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Nicholas

if i use delegates, can i get specific data back to the calling thread
(like with sinchronous calls), or do i just get something like "method
executed correctly" information? and could you perhaps point me to some
more documentation on that subject (delegates and iasync) if its not
too much of a problem

thanks
Nicholas Paldino [.NET/C# MVP] wrote:
>Are you trying to use the asynchronous ability that COM+ proxies expose,
or do you just want to make an asynchronous call in general? If the
answer
is the latter, why not just run the call on another thread? Or better
yet,
create a delegate with the same signature and then make the call to your
proxy, using the IAsyncResult returned from the async call on the
delegate.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googleg roups.com...
Hi!

i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...

anyone has any ideas how to implement it? or just a guideline maybe?

thank you

Sep 11 '06 #4
thx nick!

I read it and did some code but now i get this error: "An unhandled
exception of type 'System.OverflowException' occurred in mscorlib.dll

Additional information: Arithmetic operation resulted in an overflow."

i'm using a delegate with matching signature of remote method. here is
following code:

MyRemoteCom.Class MyCom= new MyRemoteCom.Class();
MyDelegate caller = new MyDelegate(MyCom.MyMethod);
IAsyncResult result = caller.BeginInvoke(null, null);
Thread.Sleep(2000);
label1.Text=caller.EndInvoke(result);

this looks pretty straightforward but somehow the "endinvoke" part
throws forementioned error. The remote method is simple string
returning method with no other code. If i use sync call like:
label1.text=MyCom.MyMethod() works just fine

what could be the problem here?
thanks
Nicholas Paldino [.NET/C# MVP] wrote:
6954,

Take a look at the IAsyncResult interface. There should be
documentation there on how you would get a result from the async call when
you are done.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Nicholas

if i use delegates, can i get specific data back to the calling thread
(like with sinchronous calls), or do i just get something like "method
executed correctly" information? and could you perhaps point me to some
more documentation on that subject (delegates and iasync) if its not
too much of a problem

thanks
Nicholas Paldino [.NET/C# MVP] wrote:
Are you trying to use the asynchronous ability that COM+ proxies expose,
or do you just want to make an asynchronous call in general? If the
answer
is the latter, why not just run the call on another thread? Or better
yet,
create a delegate with the same signature and then make the call to your
proxy, using the IAsyncResult returned from the async call on the
delegate.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"6954" <ma*********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi!

i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...

anyone has any ideas how to implement it? or just a guideline maybe?

thank you
Sep 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DotNetShadow | last post by:
Hi Guys I came across this article which deals with Performance Considerations for Making Web Service Calls from ASPX Pages:...
1
by: Alexander Kaplunov | last post by:
I have two different scenarios: 1. I have an application that calls a web service and passes an object. Web Service takes that object and does some stuff with it, which could take...
3
by: usenetaccount | last post by:
In a newly created test app, to maximize client performance I tried to make two SOAP method calls in tandem (the soap methods execute some specified query), as each call includes a large amount of...
1
by: dba123 | last post by:
I need to perform Asynchronous Inserts using DAAB. So far I have a method which does an insert but how can I do this Asyncronously so that it does not affect the load on our public production...
10
by: Susan | last post by:
I have a process that takes a while to run so I have it running asynchronously so that the user can continue working. My question is that I want to killl the process if the user changes the search...
0
by: Bishoy George | last post by:
Hi, I have a asp.net 2.0 web application. I want to implement the asynchronous model through http handler in web.config ...
7
by: jtbjurstrom | last post by:
Bear with me because we are new to WCF and have been going through documentation and samples trying to absorb as much as possible in a short amount of time. Any suggestions would be much...
1
by: jan.loucka | last post by:
I'm developing WinForms application in .NET 2.0 that talks to web service. The automatically generated proxy (reference class) has got methods for both synchronous and asynchronous invocations of...
1
by: jan.loucka | last post by:
I'm developing WinForms application in .NET 2.0 that talks to web service. The automatically generated proxy (reference class) has got methods for both synchronous and asynchronous invocations of...
2
by: =?Utf-8?B?S2FseWFu?= | last post by:
Hi, I have to make multiple calls (about 400K) to a webservice which returns a string. And currently it takes about a week to make all the calls. Instead of waiting for the webservice result ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.