Listbox DataBinding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J. Babe

    #1

    Listbox DataBinding

    I am trying to bind data from a database to a DropDownListBox on an
    ..aspx page.

    I want to display 2 fields in listbox (listbox's .DataTextField = two
    fields in the database "Employee.FName " & " " & "Employee.LName " -
    space in between the names)

    and also have the listbox's .DataValueField = Employee.Employ eeID
    field.

    I tried to do this by creating a field through the SQL query used to
    build a dataset, but I got the error "Dynamic SQL generation not
    supported (or similiar)". I was wondering if there is another way to
    display these two fields in the listbox?
  • Barry

    #2
    Re: Listbox DataBinding



    Use a stored proc to concatenate the name fields and bind to it instead
    of a SQL statement.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • J. Babe

      #3
      Re: Listbox DataBinding

      I'm actually using Access as my database, so I'm wondering if I can do
      this without using a stored proc.



      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...