Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: pass MS SQL server scripts into Win32::ODBC

by Corion (Pope)
on Jan 24, 2013 at 07:46 UTC ( #1015099=note: print w/ replies, xml ) Need Help??


in reply to Re^2: pass MS SQL server scripts into Win32::ODBC
in thread pass MS SQL server scripts into Win32::ODBC

None of these statements are valid SQL:

use db set nocount on declare @MRN varchar(255) set @MRN = 'xxxxxxxx' ;

Most likely, they are interpreted by whatever command line shell you use to connect to your database, and they most likely only set up output parameters and template variables that will get replaced in the real SQL later. That functionality does not live in the ODBC component of the database driver, or the database driver.

Either you shell out to the console and let it run the script, or you find out how to replicate the shell functionality with Perl.


Comment on Re^3: pass MS SQL server scripts into Win32::ODBC
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015099]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-09-30 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (379 votes), past polls