Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display database data using datalist or listbox

Status
Not open for further replies.

newbie1983

Programmer
Sep 9, 2003
52
GB
I am looking to query my sqlserver database on selected fields and wish to display the query in a datalist or listbox but how would i able to display rows with their respected fields (coloumns) ?

Regards

newbie

 
Use ADO with OLEDB provider for SQL Server.

Then use a "select "my_field_list from my_tbl" an either a recordset, a command object or a connection object, and loop through the resulting recordset and for each record returned load each individual field into a different column/row on your datalist or listbox.


If you are looking for specific code then all the above has been mentioned on these forums before, so you can search for them, and when you've tried you can come back to us with some code and errors/questions you may still have.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top