asp.net - Executing oracle spool command which is written as a .sql file(eg:spool.sql) from c# just like executing any oracle query using OracleCommand -
i have text file let "createfeed.sql" contains set commands used in pl/sql like:
set pagesize, set linesize, blah, blah, blah, then spool command create file.
so want execute createfeed.sql c#. when try give filename oraclecommand parameter giving error doesn't go way.
so there better way execute createfeed.sql script in c#?
one way found using "process" start "pl/sql" , execute script not able execute script.
you can try this:
string mycommand = psqlcommand; //this location of file string myarguments = "psqlarugments"; process.start(mycommand, myarguments); command psql.exe \i "path of createfeed.sql" mycommand = psql.exe (the full path executable) myarguments = @"\i \pathtocreatefeed.sql"
Comments
Post a Comment