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 163331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:32:55+00:00 2026-05-11T11:32:55+00:00

I have seen many references stating that TableAdapters are weak and silly, and that

  • 0

I have seen many references stating that TableAdapters are weak and silly, and that any real dev would use DataAdapters. I don’t know if that is true or not, but I am exploring the matter, and stressing out over how bad this whole ‘DataAdapter/TableAdapter against a Typed DataSets’ smells.

Let me try to explain…

Suppose I have my Typed DataSet defind in the xsd file, and now I’m ready to create a DataAdapter in code, against that schema…(By the way, I am using OleDb to access free-standing .dbf files in a folder… No SQL server stored procedures to call here, just plain old raw tables, ready for action.)

From my studies so far, here is how I see the DataAdapter used in conjunction with a Typed DataSet. Tell me if I am wrong. (Then I have my big complaint / question at the end.)

public DataTable GetJobsByCustomer(string CustNo) {     OleDbConnection conn1 = new OleDbConnection(dbConnectionString);     conn1.Open();      LMVFP ds1 = new LMVFP(); //My Typed DataSet      string sqlstring = @'SELECT act_compda, contact, cust_num, est_cost, invoiced, job_hours,                         job_invnum, job_num, job_remark, job_start, mach_cost, mat_cost, mat_mkup,                         p_o_num, priority, quote_no, quoted_by, ship_date, ship_info, shop_notes, status, total_cost                         FROM job_info                         WHERE (cust_num = ?) AND (status = 'A')                         ORDER BY priority';      OleDbDataAdapter JobsAdapter = new OleDbDataAdapter(sqlstring,conn1);     JobsAdapter.SelectCommand.Parameters.Add('?', OleDbType.VarChar,6).Value=CustNo;      JobsAdapter.Fill(ds1, 'Jobs'); // A table schema in the Typed DataSet      return ds1.Jobs;  } 

Is that how it goes? It does work, so that’s good. And indeed the strongly typed behavior is great.

Now, my gripe…. You mean to tell me that I’ve got maintain the same exaxt SQL syntax in my DAL method (GetJobsByCustomer) to match the schema of the table in the xsd? It’s crazy to have so much maintenance and dis-join between my hand-coded SQL and the xsd schema. There’s no error cathing at all, since you are writing a text string!! You get to find out at run time if it will work.

When your typing all the SQL in code, it’s terrible to have to look back and forth to keep your coded SQL in synch with the xsd table schema.

Surely I am missing something.

What a farce. The typed dataset works with beatiful intellisense and all, because it’s generated from the schema, but when it comes down to it, it’s just a pain to may to write SQL that matches the Typed schema. All they’ve done is move the headache to a new area.

Please tell me I am missing sometehing here that will make this much better.

  • 1 1 Answer
  • 2 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. 2026-05-11T11:32:56+00:00Added an answer on May 11, 2026 at 11:32 am

    I don’t believe you’re missing anything; maintaining this type of code is never fun. Thankfully we now have LINQ to SQL and Entity Framework which can both reduce the amount of manual code maintenance necessary to keep your model objects in sync with your database.

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

Sidebar

Related Questions

I have seen many apps that take instrument classes and take -javaagent as a
I have seen this problem arise in many different circumstances and would like to
Many times I have seen Visual Studio solutions which have multiple projects that share
I have seen many references to doing something like the following to insert a
I have seen many places that IE limits urls to 2000 or so characters
I have seen many programs consisting of structures like the one below typedef struct
I have seen many examples, with many 'no, you missed something' comments. What is
I have seen simple example Ajax source codes in many online tutorials. What I
Haven't seen many Geneva related questions yet, I have posted this question in the
I've seen (and used) code to have a link spawn a javascript action many

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.