On Thu, Jul 14, 2011 at 16:20:56 -0500, Marvin Bellamy wrote:
> I want to run sqlite3 from a script (actually from a ToolTask in the MSBuild
> environment) and get it to create a database without dropping into
> interactive mode.  It looks like ToolTasks don't like the redirection
> operator (they're interpreted as string literals), so this won't work:
> 
>    Sqlite3  new.db < new.sql

That's the correct way to give input to sqlite3. Your problem is how to teach
ToolTasks to understand the redirection.

Well, quick look at the documentation suggests setting 'UseCommandProcessor'
to 'true' should do the trick (it will use cmd.exe than and that does
understand redirection).

Oh, you should probably add -batch option like this:

    sqlite3 -batch new.db < new.sql

to suppress the prompts and command echo.

-- 
                                                 Jan 'Bulb' Hudec <b...@ucw.cz>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to