Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 261843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:27:57+00:00 2026-05-11T22:27:57+00:00

I have a C# Windows Forms application, whose prototype was created on SQL Server

  • 0

I have a C# Windows Forms application, whose prototype was created on SQL Server (strongly-typed dataset). In its final version, the application must be able to work over SQL Server, MySQL or Oracle.

Now I am wondering which parts (if any) can be reused from the prototype.
1. Dataset (typed) ?
2. TableAdapters? (probably not, they contain SQL Server-specific syntax)
3. Bindings to DataGridViews

Most importantly, if we need to re-implement all this, is there a way to do this at design-time? Or,
1. do we need to programmatically create untyped-dataset?
2. do we need to programmatically create its data adapters (or table adapters)? If yes, which of the two?
3. do we need to programmatically create its bindings to the datagridviews of the interface?

Perhaps irrelevant: if we create a entity model (AFAIK it provides db independence) from the existing db schema, could we use this somehow to create bindings to our datagridviews?

Thank you!

So, in order to keep our Bindings and dataGridViews, as well as some additional logic we have implemented, should we throw away all the generated TableAdapters and write them manually? If we do throw them away, should we use DataAdapters instead?

Is this a “by-the-book” approach? Has anyone done something like this?

More generally, if you need to create a Forms application to work in multiple dbs, would you do it: A. with untyped dataset, dataadapters/tableadapters and bindings created by hand B. somehow generate a vendor-independent dataset and dataadapters/tableadapters (how?) and bind them at design time through the VS gui C. some other way???

UPDATE:

So, in order to keep our Bindings and dataGridViews, as well as some additional logic we have implemented, should we throw away all the generated TableAdapters and write them manually? If we do throw them away, should we use DataAdapters instead?

Is this a “by-the-book” approach? Has anyone done something like this?

More generally, if you need to create a Forms application to work in multiple dbs, would you do it: A. with untyped dataset, dataadapters/tableadapters and bindings created by hand B. somehow generate a vendor-independent dataset and dataadapters/tableadapters (how?) and bind them at design time through the VS gui C. some other way???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:27:57+00:00Added an answer on May 11, 2026 at 10:27 pm
    1. The typed dataset/table is database independent. (however, if you add adapters in the designer they get DB-specific.. Don’t use adapters from the designer
    2. The adapters ARE NOT database independent.
    3. Databinding is database independent. But beware of drag-drop databinding automatically adding an adapter

    My advice:

    • Remove the adpaters from the dataset
      designer
    • Rewrite your own repositories/adapters using a simple class with methods that get/fill
      tables. So you use them instead of the generated adapters. These classes can be DB-specific. So for instance a PersonRepositorySqlServer,PersonRepositoryMySql. Or perhaps you give the db-type with the constructor to reuse the SQL as much as possible..
    • If you used adapter on your forms,
      remove them to. Hand-code the filling
      of the dataset

    What I always do to answer the rest of the questions

    • I use typed datasets but I just make the tables and not the adapters
    • I Usualy code the databindings since sometimes the designer messes up but this is not necessary to be db independent
    • I write my own repositories that use adapters to fill/get/update the datatables. However
      I code them by hand. Given a typed datatable it’s rather easy to auomatically generate update/insert/delete/fill statements by the way..

    Rewriting the adapters looks hard but is actually pretty doable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Oh well. If you are interested in why this situation… May 11, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer It really is the same cache at the end, only… May 11, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer Well, for reference, I've thrown together a hack that works,… May 11, 2026 at 11:43 pm

Related Questions

SOLUTION: Thanks to Patrick below, I have refactored the C# CodeProject version into a
I have recently started learning F#, and this is the first time I've ever
C# VS 2005. I have developed an application that run perfectly on my development
I am currently writing an application that will allow a user to install some

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.