|
-
Nov 1st, 2005, 05:16 AM
#1
Thread Starter
Hyperactive Member
data from multiple sources
Guys
I'm new to all this .net business. I'm currently building a bulk mailer and want to make it usable from a number of different datasources (text, csv, excel, access and sql server). I've got it working with text and csv and am currently working on the excel option however before I go on I want to know if there is a ready-made component that I can use to present the user with the option to choose any data source (oledb, ado, text etc).
Thanks
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Nov 1st, 2005, 07:05 AM
#2
Re: data from multiple sources
There are database-independent data access layers available from various sources on the Net. I believe I saw one at The Code Project. You could create your own if you wanted to of course. An alternative would be to use the lowest common denominator, i.e. OdbcClient, and just change the driver for the connection.
-
Nov 1st, 2005, 07:14 AM
#3
Thread Starter
Hyperactive Member
Re: data from multiple sources
 Originally Posted by jmcilhinney
An alternative would be to use the lowest common denominator, i.e. OdbcClient, and just change the driver for the connection.
Cheers, could you please elaborate on this? As I say, I'm new to .net
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Nov 1st, 2005, 04:51 PM
#4
Re: data from multiple sources
All the ADO.NET classes are contained within the System.Data namespace, and there are various namespaces within it that interact with one or more RDBMS. There is an SqlClient namespace specifically for SQL Server and an OracleClient namespace specifically for Oracle. There are various third-party libraries available for MySQL and there may be others for other databases. For any database that does not have a namespace dedicated to it but has an OLEDB provider, you should use the OleDb namespace. For anything else you would use the OdbcClient namespace, but given that basically every database has an ODBC driver, you could use OdbcClient for everything. It just means that your data access may not be as efficient as possible for those databases that do have more specific data access classes available. All of these namespaces contain member classes that do basically the same job as each other, e.g. SqlConnection <=> OracleConnection <=> OleDbConnection <=> OdbcConnection.
-
Nov 2nd, 2005, 06:21 AM
#5
Thread Starter
Hyperactive Member
Re: data from multiple sources
I guess what I'm after is something that will prompt the user to enter a connection string or look for a dsn - or something. I want to make the app reusable for as many datasources as possible without having to hard code connection strings for Access and SQL Server. If possible. If this makes sense?
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Nov 3rd, 2005, 08:26 AM
#6
Thread Starter
Hyperactive Member
Re: data from multiple sources
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
-
Nov 3rd, 2005, 06:19 PM
#7
Re: data from multiple sources
I'm guessing that you ignored my advice about visiting The Code Project.
http://www.codeproject.com/vb/net/data_access_layer.asp
-
Nov 4th, 2005, 06:24 AM
#8
Thread Starter
Hyperactive Member
Re: data from multiple sources
Sorry, I didn't ignore it, just didn't see it.
Thanks.
The Bloke
www.blokeinthekitchen.com
making cooking cool for blokes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|