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. populate drop down list with dataset

populate drop down list with dataset

Scheduled Pinned Locked Moved ASP.NET
tutorial
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.
  • L Offline
    L Offline
    lhahehal
    wrote on last edited by
    #1

    hi there , with refrenece to earlier articles how to return the dataset.. will this work //datalayer Public Function getBanquetProvider() cnn.Open() Dim strSql As String = "SELECT DISTINCT Company FROM Banquet" Dim cmd As New OleDbCommand(strSql, cnn) Dim da As New OleDbDataAdapter(cmd) Dim ds As New DataSet Return da.Fill(ds) cnn.Close() //webservice Public Function banquetProviderlist() Dim dl As New CalculatorData.Class1 Return (dl.getBanquetProvider()) //webform Private Sub checkcatergory() Dim bl As New getservicer.Service1 ddl_provider.DataSource = bl.banquetProviderlist() ddl_provider.DataBind()

    D 1 Reply Last reply
    0
    • L lhahehal

      hi there , with refrenece to earlier articles how to return the dataset.. will this work //datalayer Public Function getBanquetProvider() cnn.Open() Dim strSql As String = "SELECT DISTINCT Company FROM Banquet" Dim cmd As New OleDbCommand(strSql, cnn) Dim da As New OleDbDataAdapter(cmd) Dim ds As New DataSet Return da.Fill(ds) cnn.Close() //webservice Public Function banquetProviderlist() Dim dl As New CalculatorData.Class1 Return (dl.getBanquetProvider()) //webform Private Sub checkcatergory() Dim bl As New getservicer.Service1 ddl_provider.DataSource = bl.banquetProviderlist() ddl_provider.DataBind()

      D Offline
      D Offline
      Dan Morris
      wrote on last edited by
      #2

      No. DataAdapter.Fill returns an int. If you want to return the Dataset you need to call Fill and return Dataset separately. da.Fill(ds) return ds Dan Morris

      L 1 Reply Last reply
      0
      • D Dan Morris

        No. DataAdapter.Fill returns an int. If you want to return the Dataset you need to call Fill and return Dataset separately. da.Fill(ds) return ds Dan Morris

        L Offline
        L Offline
        lhahehal
        wrote on last edited by
        #3

        ohh icic .. i return the object dataset .. but the drop down list displays system.data.DataRowView where has gone wrong ...

        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