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. Database & SysAdmin
  3. Database
  4. da.Fill(second datatable)

da.Fill(second datatable)

Scheduled Pinned Locked Moved Database
questiondatabasehelp
4 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.
  • C Offline
    C Offline
    CandyMe
    wrote on last edited by
    #1

    Hi! Just a basic question but I don't know the answer =) Please help So I have a stored procedure with 2 select query SELECT A,B FROM table1 SEleCT C,D FROM table2 In my typed dataset, how do I retrieve values in table2 using da.Fill() or should I be using another code for this? da.Fill(dt); when I can't use somethign like da.Fill(dt2); Thank you very much.

    Gerri

    T 1 Reply Last reply
    0
    • C CandyMe

      Hi! Just a basic question but I don't know the answer =) Please help So I have a stored procedure with 2 select query SELECT A,B FROM table1 SEleCT C,D FROM table2 In my typed dataset, how do I retrieve values in table2 using da.Fill() or should I be using another code for this? da.Fill(dt); when I can't use somethign like da.Fill(dt2); Thank you very much.

      Gerri

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      you need to fill a dataset with the output from the stored procedure so: dim ds as dataset da.fill(ds) then the dataset will have 2 tables in it (normally) and you can select the 2 tables by there index dim dt1 as datatable = ds.tables(0) dim dt2 as datatable = ds.tables(1) sorry for the vb.net code but should be easly translated hope this helps

      If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

      C 1 Reply Last reply
      0
      • T Tom Deketelaere

        you need to fill a dataset with the output from the stored procedure so: dim ds as dataset da.fill(ds) then the dataset will have 2 tables in it (normally) and you can select the 2 tables by there index dim dt1 as datatable = ds.tables(0) dim dt2 as datatable = ds.tables(1) sorry for the vb.net code but should be easly translated hope this helps

        If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

        C Offline
        C Offline
        CandyMe
        wrote on last edited by
        #3

        Thank you. I would just like to ask. I have a Report.xsd file and uses this: DataAccess.dsReportManagementTableAdapters.rpt_RetrieveTableAdapter da = new DataAccess.dsReportManagementTableAdapters.rpt_RetrieveTableAdapter(); DataAccess.dsReportManagement.rpt_RetrieveDataTable dt = new DataAccess.dsReportManagement.rpt_RetrieveDataTable(); da.Fill(dt); How come my Fill() doesn't take a DataSet as a parameter? Thank you.

        Gerri

        T 1 Reply Last reply
        0
        • C CandyMe

          Thank you. I would just like to ask. I have a Report.xsd file and uses this: DataAccess.dsReportManagementTableAdapters.rpt_RetrieveTableAdapter da = new DataAccess.dsReportManagementTableAdapters.rpt_RetrieveTableAdapter(); DataAccess.dsReportManagement.rpt_RetrieveDataTable dt = new DataAccess.dsReportManagement.rpt_RetrieveDataTable(); da.Fill(dt); How come my Fill() doesn't take a DataSet as a parameter? Thank you.

          Gerri

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          because you don't use a dataadapter but a tableadapter from the looks of it you are trying to extract data from a xml file (on a side note xml isn't the ideal way for datastorage) I have never tryed this before but look of you cant find a xmldataadapter (or somthing like that) normally that should accept a dataset as parameter

          If my help was helpfull let me know, if not let me know why. The only way we learn is by making mistakes.

          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