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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. INSERTING TWO TABLES IN ONE GRIDVIEW

INSERTING TWO TABLES IN ONE GRIDVIEW

Scheduled Pinned Locked Moved Database
tutorialquestion
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.
  • S Offline
    S Offline
    shyne7
    wrote on last edited by
    #1

    How to insert two tables in one gridview?and how to connect it and to navigate...tnx;) sunshine

    F 1 Reply Last reply
    0
    • S shyne7

      How to insert two tables in one gridview?and how to connect it and to navigate...tnx;) sunshine

      F Offline
      F Offline
      Frank Kerrigan
      wrote on last edited by
      #2

      You could use a stored procedure with a temp table and use that create proc myproc AS SELECT * INTO #TEMP FROM Table1 SELECT * INTO #TEMP From * Table2 select * from #temp go or use a Union SELECT SELECT * FROM TABLE1 UNION ALL SELECT * FROM TABLE2 You get the idea, use SQL to do it.

      Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http://www.frankkerrigan.com/[^]

      S 1 Reply Last reply
      0
      • F Frank Kerrigan

        You could use a stored procedure with a temp table and use that create proc myproc AS SELECT * INTO #TEMP FROM Table1 SELECT * INTO #TEMP From * Table2 select * from #temp go or use a Union SELECT SELECT * FROM TABLE1 UNION ALL SELECT * FROM TABLE2 You get the idea, use SQL to do it.

        Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture) http://www.frankkerrigan.com/[^]

        S Offline
        S Offline
        shyne7
        wrote on last edited by
        #3

        Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0; Data Source = C:\Users\--Sunshine--\Documents\thesis\Database1.mdb") con.Open() Dim da As New OleDbDataAdapter(sql, con) sql = "Select * from Supplier_Information union all Select * from Products" da.Fill(ds, "Supplier_Information and Products") dgvSupplier.DataSource = ds.Tables("Supplier_Information and Products").DefaultView is this right?how will i assigned in my textboxes the table name? txtsuppID.Text = ds.Tables("which tablename??").Rows(inc).Item(0) tnx

        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