473,473 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 893

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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.