Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
BCP and ANT

BCP and ANT

2007-08-03       - By Mario Madunic
Reply:     1     2     3     4  

Thanks Bevan,

Here it is for future reference. Worked like a charm.

<exec executable="bcp">
<arg line="db.table in path\csv.txt -c -S sqlServer -U user -P password" />
</exec>


Marijan (Mario) Madunic

Quoting Bevan Arps <bevan.arps@(protected)>:

> Mario Madunic wrote:
> > has anybody used BCP (bulk copy program) with ANT. I need to insert data
> into a
> > SQL Server and would like to do this within ANT.
> >
> > Any hints on how to do this will be appreciated.
> The most straightforward approach is to first work out how to drive BCP
> from the commandline (without Ant involved at all) - and then wrap that
> commandline in an Ant <exec> task.
>
> Start with a concrete example - fixed paramters, a given input file, and
> so on, and gradually replace those with parameters one at a time.
>
> Hope this helps,
> Bevan.
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.