Hi, I have a problem with the exec task and input redirection: I want to do some sql statements on a sql server. They are stored in a file. So I call the exec task:
<exec program="osql"> <arg value="-E -S ${nameOfDBServer} -n -d ${nameOfDatabase} -Q < "${DBScriptPath}""/> </exec> The following output comes (I have put stars instead of the real names) and the task fails: [exec] Starting 'osql ( -E -S **** -n -d **** -Q < "C:\script.sql")' in '***' [exec] usage: osql [-U login id] [-P password] [exec] [-S server] [-H hostname] [-E trusted connection] [exec] [-d use database name] [-l login timeout] [-t query timeout] When removing the brackets after 'osql and .sql" and calling the line manually (out of nant), it works. Also <exec program="osql"> <arg value="-E" /> <arg value="-S ${nameOfDBServer}"/> <arg value="-n" /> <arg value="-d ${nameOfDatabase}"/> <arg value="-Q < "${DBScriptPath}"" /> </exec> doesn't work. Getting the file into a property also doesn't work ("Query length too long" or something like that). Calling simmilar execs, for example <exec program="osql""> <arg value="-E -S ${nameOfServer} -n -d ${nameOfDatabase} -Q "delete from ***;"" /> </exec> works. So I believe, that the problem is the input redirect (<) to a file... Thanks for your help in advance! Chris --------------------------------------------- Dieses Mail wurde vom E-Mail Service auf http://www.theWAP.at verschickt! ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users