If you use a datatable select on a column that contains a GUID you will have
a major problem if you are not using US language.

We are using Danish language and when selecting like this:
ds.Tables(0).Select(GuidColumn = 'SomeGUID')

It will not always return the row as expected, I suspect the problem is that
in Denmark the character "å" is the same as "aa" and one side of the
equation returns "å" while the other returns "aa".

This is a serious bug and should be fixed ASAP - I have reported this to MS
6 months ago, but to no avail.

For anyone interested I can send a project that demonstrates this behaviour.

Regards
Thorben Jensen

Re: Bug in datatable.select by Pete

Pete
Sat Jul 12 13:23:12 CDT 2003

Thorben,

Hvorden har du det?

Okay, I think I'm confused here. Does the error happen when 'SomeGUID' has
two 'a' characters in a row and it's converting it to 'å'?

You said 'one side of the equation returns "å" while the other returns
"aa".'

What exactly does that mean? I may have a solution, but I need to know the
specific problem a little better.

Takk.

Pete

"Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
news:OAphOnJSDHA.1804@TK2MSFTNGP11.phx.gbl...
> If you use a datatable select on a column that contains a GUID you will
have
> a major problem if you are not using US language.
>
> We are using Danish language and when selecting like this:
> ds.Tables(0).Select(GuidColumn = 'SomeGUID')
>
> It will not always return the row as expected, I suspect the problem is
that
> in Denmark the character "å" is the same as "aa" and one side of the
> equation returns "å" while the other returns "aa".
>
> This is a serious bug and should be fixed ASAP - I have reported this to
MS
> 6 months ago, but to no avail.
>
> For anyone interested I can send a project that demonstrates this
behaviour.
>
> Regards
> Thorben Jensen
>
>



Re: Bug in datatable.select by Pete

Pete
Mon Jul 14 07:02:10 CDT 2003

Thorben,
Have you tried setting the thread culture to us-en before doing the
comparison and then setting it back to Danish afterwards? I don't know that
that would do it, but just a possibility. I noticed the code you sent me was
setting the thread culture to us-en, so I'm assuming that doesn't work, but
thought it was worth checking.

Also, have you tried setting the cultureUI to us-en just for the select?

The bug appears to be in the method LoadExpression() of the undocumented
class ExpressionParser(), though I could be wrong. It seems that the way it
does the conversion of the string to/from individual characters may be
causing the problem, so I'm hoping that setting the culture just for the
select, will have the desired effect.

Pete

"Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
news:%23IBMnMQSDHA.2148@TK2MSFTNGP12.phx.gbl...
> Hi Pete,
>
> I cannot tell you where the problem is, I just think it has to do with the
> comparison of the Guid column and the variable holding the Guid. I dont
know
> of any way to check how the framework makes the comparison but as I said,
> the only difference between you and me is that you are running en-US and I
> am running da-DK.
>
> In Denmark we have three characters that are converted like this:
> Å=AA
> Ø=OE
> Æ=AE
> My guess is that the equation looks something like this:
>
> {DFA1F82D-8010-4FA4-B640-EB86CCE7AA09} =
> {DFA1F82D-8010-4FA4-B640-EB86CCE7Å09}
> (note the fourth last character)
>
> This is just a guess, I may be totally wrong.
> The sample program will fail in about 1-5% of all comparisons.
>
> Has anybody else tried to run my sample program and got errors? (outside
the
> US).
>
> Regards
> Thorben
>
>
> "Pete Davis" <pdavis68@hotmail.com> skrev i en meddelelse
> news:72c8b81c330530218ada4f5abdacc647@news.meganetnews.com...
> > Well, I'm using en-us, so I can't reproduce the problem, but if you can
> > describe in more detail what this issue is (as per my last e-mail), that
> > would help.
> >
> > Is it converting the text 'aa' to 'å' in the example:
> > ds.Tables(0).Select(GuidColumn = 'SomeGUID')
> > if SomeGUID has 'aa' in it?
> >
> > What is the conversion that's taking place 'aa' to 'å' or 'å' to 'aa',
and
> > where is it happening, exactly? Is it happening in your string, or is it
> > happening in the column data? I mean, a GUID can't have the character
'å'
> in
> > it, so I can only assume that somewhere 'aa' is being converted to 'å'.
> From
> > there, I may be able to help.
> >
> > Pete
> >
> >
> > "Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
> > news:uEM85eKSDHA.1804@TK2MSFTNGP11.phx.gbl...
> > > Hi Pete,
> > >
> > > Jeg har det fint :-)
> > >
> > > Please check the attached project, and you will see what i mean. I
only
> > > suspect that it has to do with the Danish characters, as it does not
> > > happen if I use en-us.
> > >
> > > Thank for your interest,
> > > Thorben
> > >
> > > "Pete Davis" <pdavis68@hotmail.com> skrev i en meddelelse
> > > news:56650f0c39a1cf42aed1a0d8b4b6093e@news.meganetnews.com...
> > > > Thorben,
> > > >
> > > > Hvorden har du det?
> > > >
> > > > Okay, I think I'm confused here. Does the error happen when
'SomeGUID'
> > has
> > > > two 'a' characters in a row and it's converting it to 'å'?
> > > >
> > > > You said 'one side of the equation returns "å" while the other
returns
> > > > "aa".'
> > > >
> > > > What exactly does that mean? I may have a solution, but I need to
know
> > the
> > > > specific problem a little better.
> > > >
> > > > Takk.
> > > >
> > > > Pete
> > > >
> > > > "Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
> > > > news:OAphOnJSDHA.1804@TK2MSFTNGP11.phx.gbl...
> > > > > If you use a datatable select on a column that contains a GUID you
> > will
> > > > have
> > > > > a major problem if you are not using US language.
> > > > >
> > > > > We are using Danish language and when selecting like this:
> > > > > ds.Tables(0).Select(GuidColumn = 'SomeGUID')
> > > > >
> > > > > It will not always return the row as expected, I suspect the
problem
> > is
> > > > that
> > > > > in Denmark the character "å" is the same as "aa" and one side of
the
> > > > > equation returns "å" while the other returns "aa".
> > > > >
> > > > > This is a serious bug and should be fixed ASAP - I have reported
> this
> > to
> > > > MS
> > > > > 6 months ago, but to no avail.
> > > > >
> > > > > For anyone interested I can send a project that demonstrates this
> > > > behaviour.
> > > > >
> > > > > Regards
> > > > > Thorben Jensen
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>



Re: Bug in datatable.select by Thomas

Thomas
Wed Jul 23 08:17:01 CDT 2003

Hi,

Just ran into the same problem (also on a Danish configuration).

Dammit, and it's in a beta-released program.

Please let me know of any news.


Best regards,
Thomas S. Andersen
thomas.andersen@datalogisk.dk


"Thorben Jensen" <no_spam_tgj@dangaard.dk> skrev i en meddelelse
news:%23jcvUCjSDHA.1868@TK2MSFTNGP11.phx.gbl...
> Hi Pete,
>
> I have have just found out that setting the cultureUI AND the tables
culture
> to en-US will solve the problem (by solve i mean it will work, its just
too
> much work to this this everytime).
>
> I also found that if you set you regional settings on you PC to Danish or
> even English-England you can see the problem for your-self.
>
> This is a MAJOR bug in the framework and should have attention from MS.
>
> Thank you for your interest,
> Thorben
>
>
> "Pete Davis" <pdavis68@hotmail.com> skrev i en meddelelse
> news:6e21dd845562f2bb1c8256367f962eff@news.meganetnews.com...
> > Thorben,
> > Have you tried setting the thread culture to us-en before doing the
> > comparison and then setting it back to Danish afterwards? I don't know
> that
> > that would do it, but just a possibility. I noticed the code you sent me
> was
> > setting the thread culture to us-en, so I'm assuming that doesn't work,
> but
> > thought it was worth checking.
> >
> > Also, have you tried setting the cultureUI to us-en just for the
> select?
> >
> > The bug appears to be in the method LoadExpression() of the
> undocumented
> > class ExpressionParser(), though I could be wrong. It seems that the way
> it
> > does the conversion of the string to/from individual characters may be
> > causing the problem, so I'm hoping that setting the culture just for the
> > select, will have the desired effect.
> >
> > Pete
> >
> > "Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
> > news:%23IBMnMQSDHA.2148@TK2MSFTNGP12.phx.gbl...
> > > Hi Pete,
> > >
> > > I cannot tell you where the problem is, I just think it has to do with
> the
> > > comparison of the Guid column and the variable holding the Guid. I
dont
> > know
> > > of any way to check how the framework makes the comparison but as I
> said,
> > > the only difference between you and me is that you are running en-US
and
> I
> > > am running da-DK.
> > >
> > > In Denmark we have three characters that are converted like this:
> > > Å=AA
> > > Ø=OE
> > > Æ=AE
> > > My guess is that the equation looks something like this:
> > >
> > > {DFA1F82D-8010-4FA4-B640-EB86CCE7AA09} =
> > > {DFA1F82D-8010-4FA4-B640-EB86CCE7Å09}
> > > (note the fourth last character)
> > >
> > > This is just a guess, I may be totally wrong.
> > > The sample program will fail in about 1-5% of all comparisons.
> > >
> > > Has anybody else tried to run my sample program and got errors?
(outside
> > the
> > > US).
> > >
> > > Regards
> > > Thorben
> > >
> > >
> > > "Pete Davis" <pdavis68@hotmail.com> skrev i en meddelelse
> > > news:72c8b81c330530218ada4f5abdacc647@news.meganetnews.com...
> > > > Well, I'm using en-us, so I can't reproduce the problem, but if you
> can
> > > > describe in more detail what this issue is (as per my last e-mail),
> that
> > > > would help.
> > > >
> > > > Is it converting the text 'aa' to 'å' in the example:
> > > > ds.Tables(0).Select(GuidColumn = 'SomeGUID')
> > > > if SomeGUID has 'aa' in it?
> > > >
> > > > What is the conversion that's taking place 'aa' to 'å' or 'å' to
'aa',
> > and
> > > > where is it happening, exactly? Is it happening in your string, or
is
> it
> > > > happening in the column data? I mean, a GUID can't have the
character
> > 'å'
> > > in
> > > > it, so I can only assume that somewhere 'aa' is being converted to
> 'å'.
> > > From
> > > > there, I may be able to help.
> > > >
> > > > Pete
> > > >
> > > >
> > > > "Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
> > > > news:uEM85eKSDHA.1804@TK2MSFTNGP11.phx.gbl...
> > > > > Hi Pete,
> > > > >
> > > > > Jeg har det fint :-)
> > > > >
> > > > > Please check the attached project, and you will see what i mean. I
> > only
> > > > > suspect that it has to do with the Danish characters, as it does
> not
> > > > > happen if I use en-us.
> > > > >
> > > > > Thank for your interest,
> > > > > Thorben
> > > > >
> > > > > "Pete Davis" <pdavis68@hotmail.com> skrev i en meddelelse
> > > > > news:56650f0c39a1cf42aed1a0d8b4b6093e@news.meganetnews.com...
> > > > > > Thorben,
> > > > > >
> > > > > > Hvorden har du det?
> > > > > >
> > > > > > Okay, I think I'm confused here. Does the error happen when
> > 'SomeGUID'
> > > > has
> > > > > > two 'a' characters in a row and it's converting it to 'å'?
> > > > > >
> > > > > > You said 'one side of the equation returns "å" while the other
> > returns
> > > > > > "aa".'
> > > > > >
> > > > > > What exactly does that mean? I may have a solution, but I need
to
> > know
> > > > the
> > > > > > specific problem a little better.
> > > > > >
> > > > > > Takk.
> > > > > >
> > > > > > Pete
> > > > > >
> > > > > > "Thorben Jensen" <no_spam_tgj@dangaard.dk> wrote in message
> > > > > > news:OAphOnJSDHA.1804@TK2MSFTNGP11.phx.gbl...
> > > > > > > If you use a datatable select on a column that contains a GUID
> you
> > > > will
> > > > > > have
> > > > > > > a major problem if you are not using US language.
> > > > > > >
> > > > > > > We are using Danish language and when selecting like this:
> > > > > > > ds.Tables(0).Select(GuidColumn = 'SomeGUID')
> > > > > > >
> > > > > > > It will not always return the row as expected, I suspect the
> > problem
> > > > is
> > > > > > that
> > > > > > > in Denmark the character "å" is the same as "aa" and one side
of
> > the
> > > > > > > equation returns "å" while the other returns "aa".
> > > > > > >
> > > > > > > This is a serious bug and should be fixed ASAP - I have
reported
> > > this
> > > > to
> > > > > > MS
> > > > > > > 6 months ago, but to no avail.
> > > > > > >
> > > > > > > For anyone interested I can send a project that demonstrates
> this
> > > > > > behaviour.
> > > > > > >
> > > > > > > Regards
> > > > > > > Thorben Jensen
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>