Databinding woes

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.

Advertisements

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 Solutionswww.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Sonny" <> wrote in message
news:...
> 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.

Advertisements

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" <> wrote in message
> news:...
> > 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.
>
>
>

Share This Page

Welcome to PC Review!

Hello and welcome to PC Review. We're a friendly computing community, bustling with knowledgeable members to help solve your tech questions.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask any tech support questions, or chat with the community and help others.
Sign up now!