A
Ana Silver
Hi,
I'm trying to write a target for ant that will invoke all my insert
scripts on a clean database. Here's the ant code:
<target name="database.insert">
<sql driver="org.postgresql.Driver" url="jdbcostgresql://myhost:5432/
mydatabase"
userid="myuser" password="mypass" encoding="UTF-8" >
<transaction src="db/${db.dir}/dbTerritorialDivision/
voivodships.sql"/>
<transaction src="db/${db.dir}/dbTerritorialDivision/districts.sql"/ <transaction src="db/${db.dir}/dbTerritorialDivision/communes.sql"/>
<transaction src="db/${db.dir}/dbTerritorialDivision/cities.sql"/>
</sql>
</target>
But when I try to execute the target, I get strange error. It seems
like and it adding a question mark before each line and because of
that insert fails.
[sql] Executing resource: D:\eclipseWorkspace\cur\src\db\postgres
\dbTerritorialDivision\voivodships.sql
[sql] SQL: ?INSERT INTO "Voivodships"(voivodship_id,voivodship_name)
VALUES(2,'Dolno¶l±skie')
[sql] Failed to execute: ?INSERT INTO
"Voivodships"(voivodship_id,voivodship_name) VALUES(2,'Dolno¶l±skie')
The .sql file is ok, there are no question marks there.
If somebody could help me to find the solution, I whould be geatefull.
Thanks in advance,
Ana
I'm trying to write a target for ant that will invoke all my insert
scripts on a clean database. Here's the ant code:
<target name="database.insert">
<sql driver="org.postgresql.Driver" url="jdbcostgresql://myhost:5432/
mydatabase"
userid="myuser" password="mypass" encoding="UTF-8" >
<transaction src="db/${db.dir}/dbTerritorialDivision/
voivodships.sql"/>
<transaction src="db/${db.dir}/dbTerritorialDivision/districts.sql"/ <transaction src="db/${db.dir}/dbTerritorialDivision/communes.sql"/>
<transaction src="db/${db.dir}/dbTerritorialDivision/cities.sql"/>
</sql>
</target>
But when I try to execute the target, I get strange error. It seems
like and it adding a question mark before each line and because of
that insert fails.
[sql] Executing resource: D:\eclipseWorkspace\cur\src\db\postgres
\dbTerritorialDivision\voivodships.sql
[sql] SQL: ?INSERT INTO "Voivodships"(voivodship_id,voivodship_name)
VALUES(2,'Dolno¶l±skie')
[sql] Failed to execute: ?INSERT INTO
"Voivodships"(voivodship_id,voivodship_name) VALUES(2,'Dolno¶l±skie')
The .sql file is ok, there are no question marks there.
If somebody could help me to find the solution, I whould be geatefull.
Thanks in advance,
Ana