ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave King <dave.ki...@prefersoft.com>
Subject SQLExec and Properties
Date Wed, 25 Apr 2001 16:22:40 GMT
I'm just wondering about adding property substitution to SQL used in the SQL
task.   I've made the changes and I'm wondering if anyone else would find
this helpful.  Being paranoid about not breaking some obscure script that
uses ${} in the sql, I added a replaceproperties attribute.  Here's what we
are using it for.

	<target name="create-db">
		<sql
			driver="${jdbc.driver}"
			url="${jdbc.url}"
			userid="${admin.id}"
			password="${admin.password}"
			replaceproperties="true"
		>
			IF NOT EXISTS (SELECT name FROM sysdatabases WHERE
name = 'ant_test')
			CREATE DATABASE ant_test
			ON 
			( NAME = ant_test_dat,
				FILENAME = '${mssql.data.dir}\ant_test.mdf'
,
				SIZE = 2MB ,
				MAXSIZE = 20MB )
			LOG ON
			( NAME = 'ant_test_log',
				FILENAME =
'${mssql.log.dir}\ant_test_Log.LDF' ,
				SIZE = 5MB ,
				MAXSIZE = 5MB 
			);
		</sql>
	</target>

If this is of interest I can post a diff and the code, but I'm not set up to
produce a patch.

-Peace
Dave

Mime
View raw message