473,394 Members | 1,709 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,394 software developers and data experts.

Need to pass a SqlConnection to a Web service

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

TIA,

Mike Rodriguez
Nov 19 '05 #1
2 1238
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/

On Fri, 15 Jul 2005 11:03:37 -0500, "Michael Rodriguez"
<mi**@nospamforme.com> wrote:
Is this possible? I tried but it complains about the SqlConnection not
being fully serializable. Are there any workarounds for this?

TIA,

Mike Rodriguez


Nov 19 '05 #2
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)

"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:ps********************************@4ax.com...
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/

On Fri, 15 Jul 2005 11:03:37 -0500, "Michael Rodriguez"
<mi**@nospamforme.com> wrote:
Is this possible? I tried but it complains about the SqlConnection not
being fully serializable. Are there any workarounds for this?

TIA,

Mike Rodriguez

Nov 19 '05 #3

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

Similar topics

3
by: Brad Navarro | last post by:
OK, I may be asking for the impossible, but I'll give it a shot: For a case like this: using System.Data.SqlClient; abstract class Base { private SqlConnection DBConnect; Base(string...
2
by: Quarantine | last post by:
I am still a noob at the whole .NET, but I have a question and hope someone can help me out. I am taking user input, then want to query a database and return the results to either a datagrid, or a...
3
by: Justnew | last post by:
Hei All Can some body help me here: I have a database name Customers, I a trying to connect to SQL server through vb.net using asp.net webform. I want to connect to the server programatically...
1
by: Justin Crossley | last post by:
I'm having a type mismatch problem when trying to pass a typed dataset to a web service. My code is: CLIENT CODE I have a dataset schema file called MainData.xsd containing a table called...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
4
by: Chris | last post by:
I don't know if it's me or .net is just getting more complicated. I am trying to call a sp and pass a parameter and return the data using VB2005. First I couldn't find any docs with samples. Second...
2
by: axel22 | last post by:
Ok here it goes. 1. I've created a new web service project in F:\c#\WebSites\ServisBaze. 2. I've published the web service with IIS in a virtual directory who's actual path is:...
2
by: rbjorkquist | last post by:
This is my first attempt at writing/using web services, so any and all comments will be greatly appreciated. With that said, I am also by no means saying this is the correct either. I have...
2
by: shauncl | last post by:
Hello Everyone, I'm currently writing a simple Windows Service (C#) that pings an ip address and inserts the pingreply result in a SQL table. I'm able to send a ping request and get the reply...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.