467,207 Members | 1,327 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,207 developers. It's quick & easy.

Bug when Binding a DataTable to a ComboBox using new MS Oracle DataAdapter

I was hoping someone else could confirm this to be a bug in the new 1.1
framework when binding to a combo box. Here is the low down: When using
the Oracle DataAdapter to return a query and fill a datatable, all the
column headers are capitalized when they are returned. If I only capitalize
the first letter of the Column Name when binding a combobox to a datatable,
the DisplayMember has no problem with the bind operation, but the
ValueMember does. It works just fine if I use all capitals for the
ColumnName, but these properties (DisplayMember and ValueMember) should in
theory both work the same way. Here is some code to help explain what I'm
talking about (assume DataTable is already full from Oracle Query).

This won't work
cbo.DataSource = dt;
//The ValueMember property will not except/convert the string provided
//to the correct uppercase for Oracle queries, but the DisplayMember will
cbo.DisplayMember = "Name"
cbo.ValueMember = "Name";

This will work
cbo.DataSource = dt;
cbo.DisplayMember = "NAME"
cbo.ValueMember = "NAME";

This will work also
cbo.DataSource = dt;
cbo.DisplayMember = dt.Columns[0].ColumnName;
cbo.ValueMember = dt.Columns[0].ColumnName;
Nov 15 '05 #1
  • viewed: 1025

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Ashwani Gaur | last post: by
3 posts views Thread by amber | last post: by
2 posts views Thread by Kjetil Klaussen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.