Databinding woes

G

Guest

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.
 
W

W.G. Ryan eMVP

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.
 
G

Guest

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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top