Need to pass a SqlConnection to a Web service

  • Thread starter Thread starter Michael Rodriguez
  • Start date Start date
M

Michael Rodriguez

Is this possible? I tried but it complains about the SqlConnection not
being fully serializable. Are there any workarounds for this?

TIA,

Mike Rodriguez
 
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).
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top