473,386 Members | 1,815 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,386 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 5205
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.