Dropdown databinding problem

N

Neel

I would like to bind a custom sql statement such as

sSqlStmt = "SELECT PgmSchID, SessionBegDate" & " - "
& "SessionEndDate" & " - " & "SessionTime" & " - "
& "SessionDay AS PgmSessions" _
& " FROM ProgramScheduling WHERE PgmID
= '" + ddlPgm1.SelectedItem.Value + "'"

below is my code which i am not able to bind
OleRdr = clsDBAccess.ExecuteReader(CommandType.Text,
sSqlStmt)
ddlPgmSess1.DataSource = OleRdr
ddlPgmSess1.DataTextField = "PgmSessions"
ddlPgmSess1.DataValueField = "PgmSchID"
ddlPgmSess1.DataBind()
ddlPgmSess1.Items.Insert(0, "Select
Session")
ddlPgmSess1.SelectedIndex = 0

help me out
Neel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top