There is no way to move a SqlConnection to another machine, or another
process.
I suppose the work around depends on what you need to do. If the web
service needs to make a connection to a database it knows nothing
about, you could encrypt and send the connection string to the web
service (assuming the connection string would be valid for the
service's security context).
--
Scott
http://www.OdeToCode.com/blogs/scott/
>Is this possible? I tried but it complains about the SqlConnection not
>being fully serializable. Are there any workarounds for this?
>
>TIA,
>
>Mike Rodriguez
Terry Olsen - 16 Jul 2005 03:12 GMT
I pass Query strings to a function and get a DataTable returned...That seems
to be the easiest way to go about it.
Dim MyDT as DataTable = SqlQuery(QueryString)
> There is no way to move a SqlConnection to another machine, or another
> process.
[quoted text clipped - 15 lines]
>>
>>Mike Rodriguez