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. Multiple query results on one form.

Multiple query results on one form.

Scheduled Pinned Locked Moved C#
databasehelpquestion
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.
  • J Offline
    J Offline
    Joe Stansfield
    wrote on last edited by
    #1

    Hey all, I am not sure whether this is possible and if I am approaching it the wrong way but... What I'd like to do is have a form that allows 3 separate records from a database to be shown in text boxes similar to: Record 1 Size Record 1 Rate | Record 2 Size Record 2 Rate | Record 3 Size Record 3 Rate | Record 1 Total | Record 2 Total | Record 3 Total | Could someone please push me in the right direction for achieving this? I have a query that returns either 1,2 or 3 records but can currently only get my form to display the same record in all 3 sets of text boxes. Any help would be appreciated! Joe

    P 1 Reply Last reply
    0
    • J Joe Stansfield

      Hey all, I am not sure whether this is possible and if I am approaching it the wrong way but... What I'd like to do is have a form that allows 3 separate records from a database to be shown in text boxes similar to: Record 1 Size Record 1 Rate | Record 2 Size Record 2 Rate | Record 3 Size Record 3 Rate | Record 1 Total | Record 2 Total | Record 3 Total | Could someone please push me in the right direction for achieving this? I have a query that returns either 1,2 or 3 records but can currently only get my form to display the same record in all 3 sets of text boxes. Any help would be appreciated! Joe

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Without seeing any of your code, it's hard to advise you on how best to do this. Are you binding textboxes directly? Are you programatically binding them? How are you retrieving the data - is it via DataSet or DataReader?

      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Onyx

      J 1 Reply Last reply
      0
      • P Pete OHanlon

        Without seeing any of your code, it's hard to advise you on how best to do this. Are you binding textboxes directly? Are you programatically binding them? How are you retrieving the data - is it via DataSet or DataReader?

        I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Onyx

        J Offline
        J Offline
        Joe Stansfield
        wrote on last edited by
        #3

        Thanks for the reply Pete, I am fairly new to this whole thing - but am slowly getting my head around it. I'm retrieving the data via DataSet, with the text boxes bound to the dataset(however I have not bound them myself, just dragged and dropped in the designer). Currently the query I have is a simple designer one with 2 parameters for if ID = @ID1 or if ID = @ID2. Joe

        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