Databinding woes

Discussion in 'Microsoft VB .NET' started by Guest, Oct 21, 2004.

  1. Guest

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

    --
    Sonny Chouinard
    R&D Manager
    CHCA Computer Systems Inc.
     
    Guest, Oct 21, 2004
    #1
    1. Advertisements

  2. 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.
     
    W.G. Ryan eMVP, Oct 22, 2004
    #2
    1. Advertisements

  3. Guest

    Guest 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" 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.

    >
    >
    >
     
    Guest, Oct 26, 2004
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ahmet GUNES

    DataBinding a Parameterized Property?

    Ahmet GUNES, Jul 9, 2003, in forum: Microsoft VB .NET
    Replies:
    0
    Views:
    515
    Ahmet GUNES
    Jul 9, 2003
  2. Richard Grene

    Excel DataBinding

    Richard Grene, Sep 27, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    490
    Paul Clement
    Sep 29, 2003
  3. Peter Huang [MSFT]

    RE: DataBinding problem with Combobox

    Peter Huang [MSFT], Oct 1, 2003, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    580
    Peter Huang [MSFT]
    Oct 2, 2003
  4. Stephen

    design time databinding

    Stephen, Oct 3, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    158
    Kevin Yu
    Oct 3, 2003
  5. BB

    Databinding Collections

    BB, Oct 16, 2003, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    195
    Jay B. Harlow [MVP - Outlook]
    Oct 16, 2003
Loading...

Share This Page