473,387 Members | 1,925 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,387 software developers and data experts.

Databinding woes

We are upgrading a VB6 app to VB.Net.

It seems that when binding a dataview/datatable to a combobox, the property
ValueMember and DisplayMember are case sensitive. So I must enter the field
name with the same case as the database. This is very hard to maintain
because we have like 1000 stored procedures and I cannot make sure that the
case in those are respected.

Is there a way to deactivate this behavior or a workaround. In the dataset
you have a property to deactivate this but there is no effect to the
databinding.

--
Sonny Chouinard
R&D Manager
CHCA Computer Systems Inc.
Nov 21 '05 #1
3 1012
you can alias the columns in your select statement or change the Column name
locally - you can just use ToUpper or ToLower- then just change the
columnmapping in your crud commands to match the new values you chose.
However this is a band aid and I'd incrementally start enforcing a standard
so you don't have to keep working around it in perpetuity.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Sonny" <So***@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
We are upgrading a VB6 app to VB.Net.

It seems that when binding a dataview/datatable to a combobox, the property ValueMember and DisplayMember are case sensitive. So I must enter the field name with the same case as the database. This is very hard to maintain
because we have like 1000 stored procedures and I cannot make sure that the case in those are respected.

Is there a way to deactivate this behavior or a workaround. In the dataset
you have a property to deactivate this but there is no effect to the
databinding.

--
Sonny Chouinard
R&D Manager
CHCA Computer Systems Inc.

Nov 21 '05 #2
Hi,

Thanks for your response. For our new product, this will be a standard to
correctly name the database objects. But for our old database. I don't think
we can do this. So i will have to use the band aid.

Thanks again

"W.G. Ryan eMVP" wrote:
you can alias the columns in your select statement or change the Column name
locally - you can just use ToUpper or ToLower- then just change the
columnmapping in your crud commands to match the new values you chose.
However this is a band aid and I'd incrementally start enforcing a standard
so you don't have to keep working around it in perpetuity.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Sonny" <So***@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
We are upgrading a VB6 app to VB.Net.

It seems that when binding a dataview/datatable to a combobox, the

property
ValueMember and DisplayMember are case sensitive. So I must enter the

field
name with the same case as the database. This is very hard to maintain
because we have like 1000 stored procedures and I cannot make sure that

the
case in those are respected.

Is there a way to deactivate this behavior or a workaround. In the dataset
you have a property to deactivate this but there is no effect to the
databinding.

--
Sonny Chouinard
R&D Manager
CHCA Computer Systems Inc.


Nov 21 '05 #3
Hi,

Thanks for your response. For our new product, this will be a standard to
correctly name the database objects. But for our old database. I don't think
we can do this. So i will have to use the band aid.

Thanks again

"W.G. Ryan eMVP" wrote:
you can alias the columns in your select statement or change the Column name
locally - you can just use ToUpper or ToLower- then just change the
columnmapping in your crud commands to match the new values you chose.
However this is a band aid and I'd incrementally start enforcing a standard
so you don't have to keep working around it in perpetuity.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Sonny" <So***@discussions.microsoft.com> wrote in message
news:97**********************************@microsof t.com...
We are upgrading a VB6 app to VB.Net.

It seems that when binding a dataview/datatable to a combobox, the

property
ValueMember and DisplayMember are case sensitive. So I must enter the

field
name with the same case as the database. This is very hard to maintain
because we have like 1000 stored procedures and I cannot make sure that

the
case in those are respected.

Is there a way to deactivate this behavior or a workaround. In the dataset
you have a property to deactivate this but there is no effect to the
databinding.

--
Sonny Chouinard
R&D Manager
CHCA Computer Systems Inc.


Nov 21 '05 #4

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

Similar topics

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,...
3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
4
by: Nathan Sokalski | last post by:
I have two databinding expressions (the first & last names from a DB) that I want to assign to the text property of a Label so that the result is LASTNAME,FIRSTNAME. At the moment, I have the...
9
by: Dennis | last post by:
I have tried using Databinding for my application but always seem to find it very restrictive (maybe I don't completely understand it enough). I always seem to find it much easier to display a...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: Wayne Sepega | last post by:
I have the following Object DataSource <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCustomer" TypeName="Customers" DataObjectTypeName="Customer"...
9
by: J055 | last post by:
Hi I have a very simple configuration of the GridView with paging and sorting. When I do a postback the DataBinding event fires twice - in both the ProcessPostData and PreRender stages of the...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.