|There's more than one way to do things|
pass MS SQL server scripts into Win32::ODBCby Anonymous Monk
|on Jan 23, 2013 at 22:07 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Hello monks and mongers!
while using Win32::ODBC to query a MS SQL server database, simple select statements work very well with $connection->Sql. I have a need of executing lengthy prebuilt SQL query files or scripts.
I can easily do this by shelling out to the command line to execute an osql or sqlcmd and run the script, capture the results in an array or hash
But... I would prefer to use Win32::ODBC and keep it all in Perl if I can
All attempts I have made, that work with simple select statements error, when I substitue the select statements with the script file name or a variable which contains the name of the file.
Any guidance will be appreciated