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

Best approach for connecting to DB

If I want to make an application that connects to eather Access DB, SQL,
Oracle, or uses Web Service. What would me the best way to do it? Any
Samples? Can I create a web reference in Runtime?

Thanks
Nov 21 '05 #1
2 966
In article <uf**************@tk2msftngp13.phx.gbl>, tc******@hotmail.com
says...
If I want to make an application that connects to eather Access DB, SQL,
Oracle, or uses Web Service. What would me the best way to do it? Any
Samples? Can I create a web reference in Runtime?


For Access/SQL/Oracle you could try the OleDb classes. For maximum
performance, you'll want to create a Factory class that will instantiate
the proper object depending on the server type (i.e. "SqlConnection" for
SQL, "OracleConnection" for Oracle, etc...). Have the factory class
(and the rest of your code) use the generic System.Data interfaces
(IDbCommand, IDbConnection, IDataReader, etc...)

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 21 '05 #2
TCordon,

You cannot make in my opinion "one" class that is the "best" way to make one
class that connects to Access, SQL and/or Oracle.

For this are 3 seperated classes that you use depending from the kind of
database you use in my opinion a better way.

A webservice has in my opinion nothing to do with the above. You can use
them in a webservice.

I hope this gives some idea's

Cor
Nov 21 '05 #3

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

Similar topics

4
by: Luis | last post by:
I have 2 asp pages, Page1.asp and Page2.asp. Page2 is a "printable" version of Page1 and it contains the same information as Page1. When Page1 is loaded in the browser it connects to a database...
6
by: Paul | last post by:
Hi. Just trying to find out the best approach as I beleive it might give me problems later on down the road. I have an ASP.NET application which references a shared database class which...
5
by: Lorn | last post by:
I'm undertaking wriitng a bridge application between a remote data server API and multiple utility applications which pull and send data to the API. The reason for a bridge is that the data server...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
6
by: Nate | last post by:
I am in a slight predicament trying to determine the most efficient and effective way to connect/disconnect from a database within a business object (c# dll). I'm also keeping in mind the concept...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
5
by: gw7rib | last post by:
I'm writing a program which has "notes" - these can appear on the screen as windows with text in. It is possible to create an "index note" - at present, this will contain a list of the titles (or...
1
by: =?Utf-8?B?Tkg=?= | last post by:
Hi, I have been building asp.net 2.0 apps now for a few years. In general I use MS Ajax and the MS Data Enterprise Application Block to manage the connecting and getting data from the database....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.