473,779 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3172
See my post here:

http://groups.google.com/group/micro...c9b0924188effa
where I talk about the EnterpriseLibra ry.Data AND the Factory Design
Pattern to deal with multiple database support.
"Joseph Gruber" <jo***********@ gmail.comwrote in message
news:11******** *************@2 2g2000hsm.googl egroups.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******** *************@2 2g2000hsm.googl egroups.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******** *************@2 2g2000hsm.googl egroups.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
2187
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, http://pear.php.net/manual/en/core.db.php d.. PHPLib database wrappers, http://sourceforge.net/projects/phplib
13
2034
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. A slash is likely inserted in front of the quote mark in "Urbanist's". Later the user runs a search of the database for "New Urbanist's nightmare".
3
2406
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 resultset and the total number of rows the select would have returned without the limit. nativly this is very easy SELECT SQL_CALC_FOUND ROWS * FROM table LIMIT 0,10 in mysql for example.
13
3409
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 front-end needs to be cross- platform (Windows and Linux). Does anyone have any suggestions on what database connectivity I should use? I've looked at mxODBC and wxODBC briefly, but am not sure what is the best way to go. BTW, although I would love...
2
1739
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. I see that php_dba is listed as an extension, but I determine which DBs are supported. However, I think that it does not support the ones I need. Thanks
27
1976
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 layer containing standard SQL compliant queries 4. any database I'm looking for the most efficient way to design tier 3. I can't use stored
1
2334
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 at a point now where I can look at switching to a better system. Jason
25
2567
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 ask here if anyone knows of such a beast... I want some code where I present an array of data, and the corresponding primary key and let the code work out whether to INSERT or UPDATE it, I also want to be able to present the data from a QBF or...
1
1678
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 abstraction things available that made my work on the libraries I made from scratch a waste of time. So now I've started researching all these things that are available, and I have to say I am a little confused. It's a matter of understanding the...
8
1840
by: Ivan S | last post by:
What are your recommendations for lightweight database abstraction library (Oracle/MySQL)? I prefer OOP. :) Tnx, Ivan.
0
9636
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10139
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.