ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: Ant SQL Task can define stored procedure?
Date Fri, 02 Apr 2004 21:55:59 GMT
Check out keepformat attribute of the sql task. Also, the escapeprocessing attribute may need
to be set. I found these two attributes to be necessary when loading packages and procedures
into a database with ant. If you are running serveral sql statements and loading a procedure,
all via a single sql file, you might need to specify delimeter="row" and organize your statements
and procedure in the file accordingly.

-Rob Anderson

> -----Original Message-----
> From: jax@purematrix.com [mailto:jax@purematrix.com]
> Sent: Friday, April 02, 2004 1:19 PM
> To: Ant Users List
> Subject: Ant SQL Task can define stored procedure?
> 
> 
> I am trying to use the Ant SQL task to replace a shell 
> scripting solution but I get errors on a stored procedure.
> Is it possible to define stored procedures via Ant SQL?
> 
>      In the midst of a stored procedure definition ...
> 
>           select @querystring = "alter table " +  
> @tmptablename + " drop constraint " + @constraintname
>           print @querystring
>           exec(@querystring)
> 
>      Ant aborts with
> 
>           com.sybase.jdbc2.jdbc.SybSQLException: Invalid 
> column name ' drop constraint '.
> 
>      This works piped to the Sql interpreter but not as part 
> of a stored proc def via Ant SQL / JDBC .... any tips?
> 
> --
> Jack J. Woehr            # "[F]ar in the empty sky a solitary 
> esophagus slept
> http://www.well.com/~jax #  upon motionless wing; everywhere 
> brooded stillness,
> http://www.softwoehr.com #  serenity, and the peace of God." 
> - Mark Twain
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message