Re: Calculations on activex components using IUSR

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Looks nice, but I don't still don't see a solution to my problem.
After doing the calculations on my values the value is converted to string
"cStr()"
because it is used in a string that is part of the webpage source.
When converting the value to string it contains a comma instead of period.

What really frustrate me is that in the exe - project this works perfect,
but not in the webproject (dll) under IIS. The values in the html source for
IIS contains commas, but the html source generated with my local vb
application contains periods.

Kind regards,

Jon Haakon


"Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ODc54Z5jGHA.1552@xxxxxxxxxxxxxxxxxxxxxxx
If you're manually converting between strings and numbers then 'Yes', use
Val() and Str(). They will always use ".", irrespective of the regional
settings.

If you have other locale issues (e.g. date/time formatting) then your
problem is bigger. If your application wasn't designed to be locale-aware
then you're "fighting against the tide". There are APIs to set the locale
for a given process or thread, but VB's runtime has generally already
initialised itself by then, and doesn't change its locale settings
afterwards.

To be honest, I'm not sure how you would change the regional settings just
for the IUSR_* user, and it doesn't sound like a good idea anyway since it
may affect other applications running under that account.

Tony Proctor

"Jon Haakon Ariansen" <jona@xxxxxxxx> wrote in message
news:OE#3AT5jGHA.3620@xxxxxxxxxxxxxxxxxxxxxxx
Hi Tony!

Thanks for fast reply!
Isn't there any way to override the default settings for IUSR to always
work
with periods (.)?

Kind regards,

Jon Haakon


"Tony Proctor" <tony_proctor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:%23CSrEB5jGHA.4652@xxxxxxxxxxxxxxxxxxxxxxx
Val() will only accept "." Jon. It's one of the few VB functions that
are
not locale-aware. Str() is another case.

Try using CDbl() instead.

Tony Proctor

"Jon Haakon Ariansen" <jona@xxxxxxxx> wrote in message
news:#q1M684jGHA.456@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I couldn't find a newsgroup more suitable this one for my question so
here
it goes.

I have made a VB dll (activeX) that runs on Windows 2003.
It's been installed many places and works fine however, there is one
server
that doesn't process the pages correct.
It uses comma (,) instead of period (.) on values with decimals. I
have
tried using VAL() function, but I can't get it to work right. The
value
is
converted to string when it is finished calculated.

I have made the component into an exe project and there it works fine.
I guess this is because running as exe, the "owner" running the
process
is
the local administrator and when it is a DLL it is the
IUSR_<machinename>
that runs the process with default settings.
My question is where and how to make "IUSR_<machinename>" use
different
settings (eg. Regional settings) as settings for all the calculations
in
the
dll. I need to control the settings "IUSR_" user uses.

I really hope there is someone that knows this...
In advance thanks a lot! The one with the correct answer will get a
big
award in heaven. Thanks!

Kind regards,

Jon Haakon










.



Relevant Pages

  • Re: Deployment + Vista
    ... The problem is it's connection string is always hard ... Server settings form. ... guess it's a good thing I do not use that for settings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: [OT] Bad characters on e-mail headers (was iceape 1.0.9 and IPv6 compatibility)
    ... Yet his name is now displayed in the From field in Icedove. ... Doubly frustrating as I'm convinced it's at least partly my settings - ... the From string on the list, ... Your sender string is different to most other posters in that the ...
    (Debian-User)
  • Re: tables
    ... bypass excel altogether and have the data within the application ... Just because you were using Excel before, that doesn't mean that the data needs to be in any sort of Excel-like object when it's entirely contained within the application. ... As far as saving goes, you have a variety of options, but one of the simplest is to put the data in your applications settings and use the Properties.Settings.Default class to read and write them. ... The array of doubles won't automatically serialize, so probably the best thing to do there is write some custom code that writes to a StringWriter based on a StringBuilder, and then save the resulting string in the application settings. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Whats best practice using dynamic connections strings
    ... the string from the Settings file to get it from this other mechanism. ... I felt this was a shortcoming of the Data Designer, ... where it will read the connection string from. ...
    (microsoft.public.vsnet.general)
  • Re: Home Video Transfer Help - DVD Quality Compression?
    ... So I'm converting old family videotapes to digtal (this being rsfck ... combinations of settings is seemingly infinite and so far every one ... Doesn't QuickTimePro have default settings for producting DVDs? ... Matt Hayes - National College Football Writer, ...
    (rec.sport.football.college)