Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. selecting table adapters in datasets

selecting table adapters in datasets

Scheduled Pinned Locked Moved C#
databasedata-structures
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Glen Harvy 0
    wrote on last edited by
    #1

    Hi, In my dataset I have numerous table adapters which I need to chose from at runtime. I can create at runtime a text string for the adapter I need to use however I cannot use that string to construct the method. What I have done is create an array of tableadapters and then used the index of that array to contruct the method. As the project grows, this is becoming a consuming exercise and I am surprised there isn't a better way. Is there some way that you can select a tableadapter from the dataset at runtime using the string representation of the table adapter to select it with. Thanks.

    G 1 Reply Last reply
    0
    • G Glen Harvy 0

      Hi, In my dataset I have numerous table adapters which I need to chose from at runtime. I can create at runtime a text string for the adapter I need to use however I cannot use that string to construct the method. What I have done is create an array of tableadapters and then used the index of that array to contruct the method. As the project grows, this is becoming a consuming exercise and I am surprised there isn't a better way. Is there some way that you can select a tableadapter from the dataset at runtime using the string representation of the table adapter to select it with. Thanks.

      G Offline
      G Offline
      Gareth H
      wrote on last edited by
      #2

      Glen Harvy, I THINK its possible to do this with Reflection, but i've never used it, maybe a bit of googling/someone else might be able to confirm my post. Regards, Gareth.

      G 1 Reply Last reply
      0
      • G Gareth H

        Glen Harvy, I THINK its possible to do this with Reflection, but i've never used it, maybe a bit of googling/someone else might be able to confirm my post. Regards, Gareth.

        G Offline
        G Offline
        Glen Harvy 0
        wrote on last edited by
        #3

        Thanks for your response. I've never used reflection either! Guess I'll have to learn :) I've tried googling (always do) and I'm sure it's there but what do I search on is the hard part :(

        Glen Harvy

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups