Get data from two different servers with two threads

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

our asp.net application needs to retrieve data from two different database
servers - one is Informix the other is SQL Server. I'd love to send out
both requests at the same time, rather than waiting for the first to get
back to me before calling the second. Where could I find a short code
sample on how to leveraging threading and/or asynchronous calls for this?
Are there general issues I should be aware of in going down this road? In
both cases, the data will be read-only.

Thanks in advance.

Mark
 
hi,

may be you can search for sample scripts on Linked servers if i am not
wrong.

Thanks
Raghavendra
 
Please see documentation for the system.Threading namespace and the
system.Threading.Thread class.
 
async would be a better answer, but there is no async support yet. if you
have a busy site, you may want to implement a thread pool, or a least a
thread quota. another issue will be that thread have the security content of
the process not the creating thread, so you will need to implement some
impersonation logic if you use trusted connections.


-- bruce (sqlwork.com)
 
Back
Top