TOTAL Noob question about SQL Server connection and binding...

SteveoAtilla

Regular
Joined
Dec 22, 2004
Messages
80
Location
The Frozen Tundra
Hello all!

First, I am a total newbie to all things .NET, and I'm building an ASP application using SQL server as the backend with integrated windows authentication and database updates, queries, mods, lookups, all with PDF output on the back end.

Whoopie!

Anyway, I can get the SQL connection to work, and can even get database adds working.

What I am stuck on now is how to bind a column from one table (SQL Command: "SELECT IDNum FROM Products") to a dropdown list to allow product editing.

Why is this such a stumbling block for me? Who know.

Thanks for all help that will be forthcoming.

Steve
 
datareader = objcmd.executereader
dropdownlist.datasource = datareader
dropdownlist.datatextfield = "name_of_field_from_sql"
dropdownlist.datavaluefield = name_of_field_from_sql"
dropdownlist.databind
datareader.close
 
Back
Top