Results 1 to 8 of 8

Thread: data from multiple sources

  1. #1

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Re: data from multiple sources

    Quote 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

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    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

  6. #6

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    Re: data from multiple sources

    Anyone?
    The Bloke
    www.blokeinthekitchen.com
    making cooking cool for blokes

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8

    Thread Starter
    Hyperactive Member thebloke's Avatar
    Join Date
    May 2003
    Posts
    358

    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
  •  



Click Here to Expand Forum to Full Width