SQL Compact 3.5 lower casing parameter names

Discussion in 'microsoft.public.sqlserver.ce' started by Richard Thombs, Mar 17, 2009.

  1. I have found that in SQL Mobile 3.0 and SQL Compact 3.5, possibly
    other versions too, that parameterised queries get their parameter
    names converted to lowercase at some point during the execution of the
    query.

    When running in locales where there is not a direct 1:1 mapping
    between upper and lowercase letters, this causes the SQL engine to
    throw missing parameter exceptions.

    For example:

    select Username from Users where UserID=@UserID

    Will work fine on a Windows Mobile device set to US English, but set
    its regional settings to Turkish and you'll get an error. At first
    glance the error complains that it can't find a parameter called
    @userid, but if you look closely, you will see that the parameter does
    not contain a lowercase 'i', it is actually a different character
    alltogether, that looks like an 'i', but doesn't have the dot.

    This is explained here: http://www.i18nguy.com/unicode/turkish-i18n.html

    And I think this thread is related too:
    http://groups.google.com/group/micr...read/thread/4f5f26f620700f3f/ae2ddcfc3d303209

    Does anybody have any suggestions for working around this? All our
    parameters are currently a mix of upper and lowercase, I suppose we
    could convert them all to lowercase, but I was hoping for a something
    rather better.

    Thanks in advance,

    R.
     
    Richard Thombs, Mar 17, 2009
    #1
    1. Advertisements

  2. Richard Thombs

    ErikEJ Guest

    That does not sound so good - and you have tested with 3.5 SP1 (build
    3.5.5692) ??
     
    ErikEJ, Mar 18, 2009
    #2
    1. Advertisements

  3. Hi Erik, thanks for your suggestion and I'm sorry it took me so long
    to respond.

    I have not tested 3.5 SP1, but unfortunately we're targeting 3.0 still
    because of it's in-ROM availability. To work around it, I actually did
    lowercase all our parameter names, which worked fine.

    When I have a little time I will check 3.5 SP1 out and post the
    results.

    Best wishes,

    R.
     
    Richard Thombs, May 5, 2009
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.