473,383 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Databinding issue with dropdown

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
Nov 17 '05 #1
0 891

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Irina Ahrens | last post by:
I have a dropdown style combobox that shows the list of active users. It is bound to datatable with two columns (UserID and UserName). I display data entry form where value for "Contact" field is...
8
by: Kris Rockwell | last post by:
Hello, I have done the following to bind data to a DropDown box: 1. Drag SQLServer table onto web form to create data connection and data adapter. 2. Generate dataset by right-clicking on...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
13
by: Michael Maes | last post by:
Hi, I have a UserControl containing some controls of which one is a ComboBox. All the InternalControls are Private and some are allowed to be accessed through Public Methods. One of the things I...
2
by: Ram | last post by:
I have an issue with detailsview control bound to an objectdatasource. scenario is i have a business logic component with CRUD methods that accept custom business entity objects. In asp.net layer...
1
by: avf | last post by:
hi all. in my code i bind a few dropdownlist boxes's lists, datasource etc. i bind the Selectedvalue property, and everything is fine. then one bright day, WITHOUT ANY CHANGE TO THE DATABINDING...
3
by: John | last post by:
I'm getting this error when i'm trying to databind my dataset to a dropdown: DataBinding: 'System.Data.DataRowView' does not contain a property with the name '12/12/2003' but if I do a...
1
by: Rex the Strange | last post by:
I'm having a problem here and am looking for the answer. I have two listboxes. One is a dropdown and the other is a simple list of items which is databound . I want to be able to allow the user to...
0
by: Chris | last post by:
I am using databinding on a pair of cascading dropdowns. You select a team and get the office they can work in. When I try to rebind the second office dropdown I get the following error. ...
2
by: phpmel | last post by:
hi guys, I am using Visual Studio 2005. I have a dropdown list that has an associated SQLdatasource. I also have a textbox below the dropdown list that allows you to add items to the table that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.