Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extract data from database

 
Johnny Woosh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there. i want to extract data from database and display it in a list whereby users can actually select from the list.how do i go about doing it? any help will be appreciated.thx.this is wat i did.
 
Phillip Koebbe
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose you have a table with states in it and you want a combo box in your application with all the states. You would need to have a select statement that retrieved the states



then you would need to iterate through the resultset adding each value to the combobox



Now, this is a very simple example. You will run into greater problems when you want to use the selected value's keyfield as a foreignkey value in another table. To do that, you will have to create your own combobox that supports the values you will need to store. I'm sure there are many programmers out there who have done, and there are various ways to do it. I created what I call "IdComboBox" which stores an integer "id" and a string "description". The string gets displayed in the list portion of the combobox, but I use the integer when the user selects a value.

I do hope that is what you are talking about.

Peace,
Phillip
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic