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

Multi-DataBase Application Support

Hi.
I Have to do a muliple database application (think in a simple form
that add, remove, and modify some table/s). But The problem is that
the Database destination depends, can be per example SQL Server or
MySQL, or Oracle or other.
I Think to do a class that inherits from IDBConnection and one
constructor whit one parameter that have TypeOfServer that give me
MsSQL or MySQL per example like a String.
If This paramater is "MsSQL" i return a connection of Type
(System.Data.SQLClient).
Is that posible? i think this or a property of his class.

How can i do it?
Other problem is that i know that i can use SQLClient type for MsSQL
but for MySQL what i use?

And The Off-Toppic Question is.
When you have an application, you use One conecction, and you open
when application start and you close when application ends or you
create an connect on every step you need?

THANKS A LOT.
kat0
Nov 15 '05 #1
2 5201
Hi

see http://www.codeproject.com/cs/database/dal.asp

Jarek

"kat0" <ln****@yahoo.com.ar> wrote in message
news:2e**************************@posting.google.c om...
Hi.
I Have to do a muliple database application (think in a simple form
that add, remove, and modify some table/s). But The problem is that
the Database destination depends, can be per example SQL Server or
MySQL, or Oracle or other.
I Think to do a class that inherits from IDBConnection and one
constructor whit one parameter that have TypeOfServer that give me
MsSQL or MySQL per example like a String.
If This paramater is "MsSQL" i return a connection of Type
(System.Data.SQLClient).
Is that posible? i think this or a property of his class.

How can i do it?
Other problem is that i know that i can use SQLClient type for MsSQL
but for MySQL what i use?

And The Off-Toppic Question is.
When you have an application, you use One conecction, and you open
when application start and you close when application ends or you
create an connect on every step you need?

THANKS A LOT.
kat0

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003
Nov 15 '05 #2
MP
this is a very good example of what you need,

The new .NET PetShop 3.0 implements a Data Access Layer against both SQL
Server 2000 and Oracle 9i backend databases.

and more...
enterprise architecture
used to compare to Sun Microsystem's J2EE Pet Store

I hope this help...

http://microsoft.com/downloads/detai...displaylang=en

"kat0" <ln****@yahoo.com.ar> wrote in message
news:2e**************************@posting.google.c om...
Hi.
I Have to do a muliple database application (think in a simple form
that add, remove, and modify some table/s). But The problem is that
the Database destination depends, can be per example SQL Server or
MySQL, or Oracle or other.
I Think to do a class that inherits from IDBConnection and one
constructor whit one parameter that have TypeOfServer that give me
MsSQL or MySQL per example like a String.
If This paramater is "MsSQL" i return a connection of Type
(System.Data.SQLClient).
Is that posible? i think this or a property of his class.

How can i do it?
Other problem is that i know that i can use SQLClient type for MsSQL
but for MySQL what i use?

And The Off-Toppic Question is.
When you have an application, you use One conecction, and you open
when application start and you close when application ends or you
create an connect on every step you need?

THANKS A LOT.
kat0

Nov 15 '05 #3

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

Similar topics

37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
2
by: ip4ram | last post by:
I used to work with C and have a set of libraries which allocate multi-dimensional arrays(2 and 3) with single malloc call. data_type **myarray =...
6
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
5
by: dkelly925 | last post by:
Is there a way to add an If Statement to the following code so if data in a field equals "x" it will launch one report and if it equals "y" it would open another report. Anyone know how to modify...
23
by: Kaz Kylheku | last post by:
I've been reading the recent cross-posted flamewar, and read Guido's article where he posits that embedding multi-line lambdas in expressions is an unsolvable puzzle. So for the last 15 minutes...
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
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...
1
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....

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.