Session.LCID / SetLocale() don't effect CreateObject()?

Discussion in 'ASP General' started by David Patow, Nov 13, 2003.

  1. David Patow

    David Patow Guest

    Can anyone explain why neither ASP Session.LCID nor
    VBScript SetLocale() effect the locale of a VB6-based COM
    object that is instantiated via Server.CreateObject()?
    If I set Session.LCID, then create a VB-based object, the
    object still seems to use the system LCID for formatting
    dates & numbers.

    Using FormatDateTime() within the VBScript of the ASP
    *does* work -- It's just that created objects don't seem
    to inherit the locale.

    I tried using Win32 SetThreadLocale() within the VB
    object, and it does change the thread's locale, but that
    still doesn't seem to effect the result of VB
    FormatDateTime().

    How else could I dynamically change the effective locale
    of my ASP and VB6-based COM objects to produce date &
    number formats for any given locale?
    David Patow, Nov 13, 2003
    #1
    1. Advertising

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. Raúl Martín
    Replies:
    1
    Views:
    10,808
    Natty Gur
    May 13, 2004
  2. ubi_comp
    Replies:
    0
    Views:
    2,242
    ubi_comp
    Feb 3, 2006
  3. ashish
    Replies:
    1
    Views:
    437
    ashish
    Aug 14, 2007
  4. Just4U

    Session.LCID changing has no effect

    Just4U, Aug 27, 2007, in forum: ASP General
    Replies:
    0
    Views:
    226
    Just4U
    Aug 27, 2007
  5. Sagar

    Server.CreateObject Vs CreateObject

    Sagar, Jan 15, 2008, in forum: ASP General
    Replies:
    2
    Views:
    333
    Sagar
    Jan 15, 2008
Loading...

Share This Page