By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

Serializing datasets

P: n/a
I am serializing datasets and sending them out to a client application via a
web service. My problem is that the associated schema includes all of my
connection string, database username and password and SQL info. This is bad.
I can think of two ways to deal with this:

1. Parse the data out of the schema before i send it out
2. Encrypt the data

My question is......is there a better way?
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
How does your schema contain this information?

You Schema is only a blueprint, your dataadapters/datacommands contain
connection info, not the schema.

-CJ
"Doug Eller" <de****@adamcorp.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am serializing datasets and sending them out to a client application via a web service. My problem is that the associated schema includes all of my
connection string, database username and password and SQL info. This is bad. I can think of two ways to deal with this:

1. Parse the data out of the schema before i send it out
2. Encrypt the data

My question is......is there a better way?

Nov 20 '05 #2

P: n/a
Actually, the result of:

myXmlSerializer.serialize(myStream, myDataSet)

is a schema(the description of the dataset)and xml(the data in the dataset).
The schema contains ALL of the information about the dataset, including
connection strings, SQL, etc. But - and here is where I actually discovered
the answer to my own question yesterday afternoon - the connection strings
and SQL info are all stored, prior to serialization, in a property of the
datatable class called ExtendedProperties. This property is a hashtable
that, itself, has a method called ExtendedProperties.Remove(myProperty).
Invoke this, pass it the name of the property you don't want serialized and
BAM!........no SQL or connection strings in your serialized dataset. Now, in
my situation, my web service is authenticating users and can, therefore,
easily determine if the user is someone who needs the database info or not
and then include or remove that info accordingly.

I hope this helps anyone else who has the problem. Also, if anyone knows
another way to go about what I am doing, let me know.

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:10*************@corp.supernews.com...
How does your schema contain this information?

You Schema is only a blueprint, your dataadapters/datacommands contain
connection info, not the schema.

-CJ
"Doug Eller" <de****@adamcorp.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am serializing datasets and sending them out to a client application
via a
web service. My problem is that the associated schema includes all of my
connection string, database username and password and SQL info. This is

bad.
I can think of two ways to deal with this:

1. Parse the data out of the schema before i send it out
2. Encrypt the data

My question is......is there a better way?


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.