471,582 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,582 software developers and data experts.

2 questions about Microsoft Enterprise Library

Hi, all

I am using Enterprise Library for .NET Framework 2.0 - January 2006 to
access my backend MS SQL database. As now we are consider migrate sql
database to mySQL. What engine (ODBC or MySQL for .NET) should I use so
that the code change wil be minimum?

Also, as the enterprise lib using connectionstrings in web.config to
access the database, is there a way to encrypt this connectionstring,
do I need to change the Enterprise Library. ( I did not find the place
that the DBFactory get the connectionstring)
Thanks a lot
-rockdale

Jan 8 '07 #1
2 1844
The Enterprise Library is supposed to insulate you from the db of choice, as
far as the DotNet is concerned.

You should have a DataLayer object(s).

The datalayer object ~uses the EnterpriseLibrary.Data class as a ~~helper
....

Your datalayer object will return
IDataReaders
DataSets
scalars
and occasionaly voids.

You then only have to put in the correct information in the web.config file
for mySQL.

You don't get a connectionstring from the EnterpriseLibrary. That's not its
function.

Its function is to create an abstract way to talk to ~any datastore, with
the same syntax, regardless of vendor.
All you have to do is set the correct config file settings.
You can look at this blog:
http://sholliday.spaces.live.com/blog/

to see how to create a correct datalayer assembly and object(s).

"rockdale" <ro************@gmail.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
Hi, all

I am using Enterprise Library for .NET Framework 2.0 - January 2006 to
access my backend MS SQL database. As now we are consider migrate sql
database to mySQL. What engine (ODBC or MySQL for .NET) should I use so
that the code change wil be minimum?

Also, as the enterprise lib using connectionstrings in web.config to
access the database, is there a way to encrypt this connectionstring,
do I need to change the Enterprise Library. ( I did not find the place
that the DBFactory get the connectionstring)
Thanks a lot
-rockdale

Jan 8 '07 #2
Well, I guess I did not express myself very clearly.

I implemented the Ent Lib 2.0 data block against SQL database
successfully. The system now is a production system. But now we want to
migrate the database to MySQL. From mySQL website you can find
Connector/Net 1.0 and COnnector/ODBC, further more this link
http://dev.mysql.com/tech-resources/...x.html#ADO.NET
talks about different approaches to connect to mySQL.

My question is which one should I use so that my code change is
minimum. I guess if I use ODBC then what I need to change is the
connectionstring in my web.config file only, but ODBC may not be the
best choice since it is slow? For Connector/Net1.0 I am not sure
whether Ent Lib 2.0 support it or not and how to implement it to let
Ent Lib 2.0 to support it.
My second question is how can I encrypt the connectionstring in my
web.config file to protect user credential and at the same time the ENt
Lib 2.0 can use the decrypted connectionstring. (where should I decrypt
the connectionstring?)

Sorry for the confusing first post

Thanks again
-rockdale

sloan wrote:
The Enterprise Library is supposed to insulate you from the db of choice, as
far as the DotNet is concerned.

You should have a DataLayer object(s).

The datalayer object ~uses the EnterpriseLibrary.Data class as a ~~helper
...

Your datalayer object will return
IDataReaders
DataSets
scalars
and occasionaly voids.

You then only have to put in the correct information in the web.config file
for mySQL.

You don't get a connectionstring from the EnterpriseLibrary. That's not its
function.

Its function is to create an abstract way to talk to ~any datastore, with
the same syntax, regardless of vendor.
All you have to do is set the correct config file settings.
You can look at this blog:
http://sholliday.spaces.live.com/blog/

to see how to create a correct datalayer assembly and object(s).

"rockdale" <ro************@gmail.comwrote in message
news:11*********************@v33g2000cwv.googlegro ups.com...
Hi, all

I am using Enterprise Library for .NET Framework 2.0 - January 2006 to
access my backend MS SQL database. As now we are consider migrate sql
database to mySQL. What engine (ODBC or MySQL for .NET) should I use so
that the code change wil be minimum?

Also, as the enterprise lib using connectionstrings in web.config to
access the database, is there a way to encrypt this connectionstring,
do I need to change the Enterprise Library. ( I did not find the place
that the DBFactory get the connectionstring)
Thanks a lot
-rockdale
Jan 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Harry J | last post: by
4 posts views Thread by Varun | last post: by
8 posts views Thread by poifull | last post: by
6 posts views Thread by Mukesh | last post: by
3 posts views Thread by Justin Kadima | last post: by
5 posts views Thread by Michael Howes | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
1 post views Thread by lumer26 | last post: by

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.