Zanox

Mittwoch, 23. Mai 2012

How to merge two java.util.Properties objects?

To merge two Properties-Objects you shold use putAll(...)-function:

Properties props1= new Properties();
Properties props2= new Properties(); 
Properties mergedProps = new Properties();
... 
mergedProps.putAll(props1);
mergedProps.putAll(props2);
 
now mergedProps-Object contains all values of both Properties-Objects (props1 and props2).

Donnerstag, 19. April 2012

CASE expression

CASE <case-operand>

    WHEN when-condition THEN result-expression

   <...WHEN when-condition THEN result-expression>

   <ELSE result-expression>

END


case-operand
    is a valid sql-expression that resolves to a table column whose values are compared to all the when-conditions

when-condition
        When case-operand is specified, when-condition is a shortened sql-expression that assumes case-operand as one of its operands and that resolves to true or false.
        When case-operand is not specified, when-condition is an sql-expression that resolves to true or false.

result-expression
    is an sql-expression that resolves to a value.

Example

SELCET city, country =   
    CASE coid
        WHEN 'DE' THEN 'Germany'
        WHEN 'CH' THEN 'Swiss'
        WHEN 'AT' THEN 'Austria'
        ELSE 'not defined'
    END
FROM map.city;


or if you have more then one argument to compare you can use this statement:
 
SELECT id, name,
    CASE
        WHEN(acde = 'IMP' and tin_uid <> '01234') THEN '01234'
   
    WHEN(acde = 'EMP' and tin_uid <> '12345') THEN '12345'
   
    WHEN(acde = 'SPE' and tin_uid <> '23456') THEN '23456'
   
    WHEN(acde = 'VER' and tin_uid <> '34567') THEN '34567'
        ELSE tin_uid
    END tin
FROM db01.ze1020
       

Mittwoch, 28. März 2012

InstallShield Setup Fails with "JVM not found"

   

Problem Description
A user attempts to install "Zoll Software" using the InstallShield setup program.
  • The user sees the InstallShield Wizard dialog with a Preparing Java Virtual Machine status bar.
  • The Installer panel is displayed with the message Welcome to the InstallShield Wizard for Zoll Software .
  • The user clicks Next through each of the Wizard configuration panels.
  • The Windows Installer panel is displayed with the message preparing to install... 
  • After a short delay, the user is returned to the Installer panel. The following JVM not found error is displayed: 

The installation directory contains a log.txt file with the following error: 
(28.03.2012 12:26:32), Install, com.installshield.product.service.product.PureJavaProductServiceImpl$Installer, err, ProductException: (error code = 601; message="Es wurde keine JVM gefunden.")




Problem Resolution
The error occurred because the setup.exe program was run from a folder whose name began with the '#' character (C:\Software\# VLogMISO\update3.0.6\setup.exe). To resolve the problem, rename the directory and remove the '#' character. Rerun the setup program. This problem may be fixed in a future version of the "Zoll Software" installation program.