[izpack-users] Updating db with INSTALL_PATH value
Miraodb
miraodb at hotmail.com
Mon Jan 9 09:59:51 CET 2006
Hi yossi,
may i say.... i didn't think it was possible to execute an sql query the way
you did it.
looks cool, even though you're getting stocked.
Anyhow, did you have a look at the cookbook i made on how to execute SQL ?
it's in the docu.
i use JDBC, processpanel and it's platform independant. i think that's what
you're looking for.$INSTALL_PATH can be taken as a parameter very easely in
that case.
Let me know if you need more help.
fabrice
----- Original Message -----
From: "Yossi Baram" <yossiba at eldat.com>
To: <izpack-users at lists.berlios.de>
Sent: Monday, January 09, 2006 9:52 AM
Subject: [izpack-users] Updating db with INSTALL_PATH value
Hi,
I need to update my db with $INSTALL_PATH value, set by the user, after
InstallPanel run (at the end of installation).
myAntActionsSpec.xml (Here I get $INSTALL_PATH value)
<pack name="Mysql Install">
<antcall quiet="yes"
buildfile="$INSTALL_PATH/compile/Mysql.xml"
order="afterpacks">
<property name="INSTALL_PATH" value="$INSTALL_PATH"/>
<property name="BASE_SYSTEM" value="System"/>
<target name="compile" />
</antcall>
</pack>
Mysql.xml (Here I excute the query)
<?xml version="1.0"?>
<project name="AdvanTAG Installer" default="compile" basedir=".">
<target name="sql">
......
<exec executable="C:\mysql\bin\mysql">
<arg value="-u"/>
<arg value="root"/>
<arg value="-e"/>
<arg value="create database advantag_Ndb"/>
</exec>
<sql driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/advantag_Ndb"
userid="root"
password=""
autocommit="false">
<classpath>
<pathelement
location="${BASE_SYSTEM}\Mysql\mysql-connector-java-3.1.10-bin.jar"></pa
thelement>
</classpath>
update SITE_CONFIGURATION set
value='c:\\advtemp' where SiteParameter like 'TempFolder';
</sql>
</target>
<target name="compile" depends="sql"/>
</project>
Can I set somehow the $INSTALL_PATH value into a query (kind of dynamic
query)?
It should be some thing like:
update SITE_CONFIGURATION set value=$INSTALL_PATH + where
SiteParameter like 'TempFolder';
..but id doesnt work like that because the sql tag expect to get a
simple string as aquery?
Please advise
Thanks
Yossi
More information about the izpack-users
mailing list