Results 1 to 4 of 4

Thread: VS2008 question about typed dataset

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    VS2008 question about typed dataset

    I created a typed dataset, and added additional methods to the adapter. When I created the typed dataset, I used System.Data.SqlClient for the connection. But now, I realized I want to use System.Data.OleDb. Is there a way for me to transfer all the methods that I added in the adapter in the typed dataset that uses the SqlClient connection? (without having to basically do it over?)

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: VS2008 question about typed dataset

    What is your back end ?
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: VS2008 question about typed dataset

    It's possible you can just open the code file for the typed dataset and do a find & replace on sql to oledb. eg sqlCommand becomes oledbCommand. I would save a backup of the file first and see how it goes.
    The problem with computers is their nature is pure logic. Just once I'd like my computer to do something deluded.

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: VS2008 question about typed dataset

    Hello,

    This highlights one of the main "issues" with ADO.Net. It's great in that you can connect to multiple databases, etc, however, in using the dedicated classes for a particular database, you leave yourself in a position where you can't connect to other back ends without changes to your code.

    There is a technique known as the provider model where you can write your code in such a way that you can quickly swap out database backends without the need to change you core code. A great sample application that shows how this can be done is the Beerhouse sample kit:

    http://thebeerhouse.codeplex.com/releases/view/127

    Gary

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