473,320 Members | 2,147 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,320 software developers and data experts.

ASP.NET Database Abstraction

Hi All.

I'm a PHP programer moving to ASP.NET for this project I'm working
on. The project I'm working on will require that the ASP.NET
application support multiple databases (e.g. Oracle, MySQL and
MSSQL). I've done some google searching but am not finding an answer
to my question. Is there a database abstraction layer for ASP.NET
similar to how there is one for PHP? If not any suggestions/articles
on writing one?

Thanks.

Joseph

Oct 30 '07 #1
3 3155
See my post here:

http://groups.google.com/group/micro...c9b0924188effa
where I talk about the EnterpriseLibrary.Data AND the Factory Design
Pattern to deal with multiple database support.
"Joseph Gruber" <jo***********@gmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
Hi All.

I'm a PHP programer moving to ASP.NET for this project I'm working
on. The project I'm working on will require that the ASP.NET
application support multiple databases (e.g. Oracle, MySQL and
MSSQL). I've done some google searching but am not finding an answer
to my question. Is there a database abstraction layer for ASP.NET
similar to how there is one for PHP? If not any suggestions/articles
on writing one?

Thanks.

Joseph

Oct 30 '07 #2
"Joseph Gruber" <jo***********@gmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
Is there a database abstraction layer for ASP.NET
There most certainly is:
http://msdn.microsoft.com/msdnmag/is...07/DataPoints/

Comes pre-configured for SQL Server, but includes instructions on how to add
Oracle which you can use as a guideline for adding other providers...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 30 '07 #3
Not in the box, but you can download the Enterprise Library, which has a
Data Access block to abstract data connections via a factory method. You
then use config to switch. You would have to write the MySQL implementation,
but the classes are fairly easy to dink with once you understand the inner
workings. A few years ago, I created an Oracle version for the Data Access
Block, when there was none. It was pretty much just copy and alter, with a
few tweaks to fit the Oracle means of doing things.

I am sure there is also a third party abstraction out there somewhere,
perhaps open source. For open source, look at sourceforge.net and
codeplex.com.

If you have to write your own, you might look at the Design Pattern
Framework from dofactory.com. Other options include using a code gen. There
are a variety here you can try: IronSpeed, Genome, LLBLGen Pro, CodeSmith
with .NET Tiers, etc.

Of the various code gens, I currently like LLBLGen Pro the best, as it more
efficiently uses database connections, especially when lazy loading a
collection. I am currently playing with IronSpeed and have a copy of Genome
for review. There are also some open source implementations. NHibernate, for
example, allows you to control the output via XML templates.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Joseph Gruber" <jo***********@gmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
Hi All.

I'm a PHP programer moving to ASP.NET for this project I'm working
on. The project I'm working on will require that the ASP.NET
application support multiple databases (e.g. Oracle, MySQL and
MSSQL). I've done some google searching but am not finding an answer
to my question. Is there a database abstraction layer for ASP.NET
similar to how there is one for PHP? If not any suggestions/articles
on writing one?

Thanks.

Joseph

Oct 30 '07 #4

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

Similar topics

9
by: Ruby Tuesday | last post by:
Which one is better to do dynamic websites using MySQL? Thanks a.. ADODB, http://php.weblogs.com/ADOdb/ b.. Metabase, http://www.phpclasses.org/browse.html/package/20.html c.. PEAR::DB,...
13
by: lawrence | last post by:
A user writes this sentence: "It was the New Urbanist's nightmare of sprawl run amok." They input that and my PHP script hits it with addslashes() and then the sentence gets put in the database....
3
by: Rainer Collet | last post by:
hi! i tested several php database abstraction layers (db, mdb(2), creole, adodb, etc), but i always missed one really important feature: i need a method for a limited select which gives me the...
13
by: SectorUnknown | last post by:
I've written a database (Access mdb) front-end using Python/wxpython/and ADO. However, the scope of the project has changed and I need to access the same data on an MSSQL server. Also, the...
2
by: David | last post by:
Is there a good DataBase Abstraction layer that will handle the mySql, Sql Server, and MS Access engines? I do not wish to write the same functions with the three different PHP db functions. ...
27
by: Brett | last post by:
If I want to easily swap the database I'm using, what is the best method for developing that tier in my application? I'll have basically a 4 tier app: 1. presentation 2. business logic 3. data...
1
by: DartmanX | last post by:
I'm looking for any comparisons of PHP Database Abstraction Layers out there, with an eye towards speed/efficiency. I'm still using PEAR::DB, which obviously leaves something to be desired. I'm...
25
by: Colin McKinnon | last post by:
Hi all, There's lots of DB abstraction layers out there, but a quick look around them hasn't turned up anything which seems to met my requirements. Before I go off and write one I thought I'd...
1
by: rickycornell | last post by:
Greetings All, On past projects in PHP4 I had always just written my own libraries to deal with database interaction. Somehow I was operating in the dark that there were all these database...
8
by: Ivan S | last post by:
What are your recommendations for lightweight database abstraction library (Oracle/MySQL)? I prefer OOP. :) Tnx, Ivan.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.