Re: strtomember and strtoset bug with hyphen

From: Mosha Pasumansky [MS] (moshap_at_online.microsoft.com)
Date: 07/30/04


Date: Thu, 29 Jul 2004 18:10:33 -0700

I fully agree with you that the documentation should've been much clearer in
this respect.
As I explained, this cannot be considered as bug, because "-" and other
special characters have meaning in MDX. Just like you cannot use "-" or
space in the member name without quoting it with [ ]'s or you cannot use
reserved keyword as the member name without quoting it.

-- 
==================================================
Mosha Pasumansky  - http://www.mosha.com/msolap
Yukon information at http://www.mosha.com/msolap/yukon.htm
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================
"MT" <MT@discussions.microsoft.com> wrote in message
news:D2071CA5-5DF4-47EF-85BF-02976764FB0A@microsoft.com...
> Mosha,
>
> thanks for the reply but to be quite honest, if this was documented
> it would have saved a lot of testing and investigating.
>
> The only reference I have found is a MSFT webcast on user security where
> this is directly referenced in the powerpoint presentation that
accompanies the
> webcast.
>
> :-(
>
> Regards,
> MT
>
> PS
> I still would consider it a bug because hyphens are relatively normal in
any text.
> In my case, Windows usernames...
>
>
> "Mosha Pasumansky [MS]" wrote:
>
> > This is probably not bug, but by design. StrToMember and StrToSet parse
the
> > input strings and treat them as MDX expressions which should produce
Member
> > or Set. Therefore, if you used unquoted "-", it will be treated as
operator
> > minus.
> > You should either quote the special characters, i.e.
StrToMember("[Hyphen -
> > example]"), or use .Item function on the MEMBERS collection.
> >
> > -- 
> > ==================================================
> > Mosha Pasumansky  - http://www.mosha.com/msolap
> > Yukon information at http://www.mosha.com/msolap/yukon.htm
> > Development Lead in the Analysis Server team
> > All you need is love (John Lennon)
> > Disclaimer : This posting is provided "AS IS" with no warranties, and
> > confers no rights.
> > ==================================================
> >
> > "MT" <MT@discussions.microsoft.com> wrote in message
> > news:92E9AE08-61CE-4E33-8C46-DDDE55E065C6@microsoft.com...
> > > I have been told that the functions strtomember and strtoset have
problems
> > > with certain symbols such as hyphens ("-").
> > >
> > > Does anyone know where this problem might be documented?
> > >
> > > Are there any other characters that also cause such problems?
> > >
> > > Regards,
> > > MT
> > >
> >
> >
> >


Relevant Pages

  • Weekly Python Patch/Bug Summary
    ... Patch / Bug Summary ... Help with Python codebase ... Update to Macintosh library documentation ... Segfaults on memory error ...
    (comp.lang.python)
  • Weekly Python Patch/Bug Summary
    ... Patch / Bug Summary ... typo in liblocale.tex ... subprocess documentation ... Registry not updated by 2.4b1 installer ...
    (comp.lang.python)
  • Re: Tired of 100s of stupid Getter/Setter methods
    ... > reading the documentation that the library developer wrote. ... ability to become familiar with an API. ... Given the choice between finding out about a bug as I'm writing the ... say about a language that's one of the more readable that I work in. ...
    (comp.lang.java.programmer)
  • Re: What do others make of this code?
    ... documentation with doxygen, but to make it really pretty is an art. ... the source code, rather than, say, putting it in a configuration file, is a ... The reason this whole subject stuck in my mind is that, as a general rule, ... > desirable to distinguish between member names and local names within ...
    (comp.lang.cpp)
  • Weekly Python Patch/Bug Summary
    ... optparse documentation bug fixes ... http://python.org/sf/1203329 closed by loewis ... http://python.org/sf/967182 closed by montanaro ...
    (comp.lang.python)