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. Web Development
  3. ASP.NET
  4. Data Adapter

Data Adapter

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasetutorialquestion
3 Posts 3 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.
  • R Offline
    R Offline
    Rahithi
    wrote on last edited by
    #1

    Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi

    If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

    M A 2 Replies Last reply
    0
    • R Rahithi

      Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi

      If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      MSDN[^]

      1 Reply Last reply
      0
      • R Rahithi

        Hi all, i am trying to learn .Net Techonolgy. please can anyone tell me how you fill a table with data from a database.? i know we can use Data adapter to fill the data from the dataset. but i want to know this with sample example. thanks in advance, Rahi

        If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        A Offline
        A Offline
        anuj_24mar yahoo com
        wrote on last edited by
        #3

        use System.Data.SqlClient; SqlConnection conn = new SqlConnection("Data Source=....;Initial Catalog="databasename";User Id=sa;password=;"); SqlCommand cmd= new SqlCommand("Select * from customer", conn); SqlDataAdapter adp=new SqlDataAdapter(cmd); DataSet ds=new DataSet(); adp.fill(ds,"TableAliasName"); now ds contain data from table in database. if u want display data in grid then GridView1.DataSource=ds; GridView1.DataBind();

        anujsharma

        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