[unixODBC-support] Newbie question - how to execute a stored proc

John Bradley jbradley at lanvera.com
Tue Mar 5 16:25:45 GMT 2013

I have a completely newbie question for the list. I've looked through a few years' worth of archives but can't find it addressed anywhere previously and Google isn't helping me at all. I've installed and started using unixODBC and am working on a Linux c shell script that uses ISQL from the command line to run some queries in my MSSQL 2008 DB. Everything works fine, except I can't figure out how to get it to run a stored procedure.

An example of something that works:

variable=`echo select column from schema.table where column=thing|isql dbname userid password -b -x0x20`

This populates variable and everything works. I figured I'd be able to do the same thing with an sp:

`echo exec schema.procname @parm=value|isql dbname userid password -b -x0x20`

But all I get in return is "[ISQL]ERROR: Could not SQLExecute". I've tried every permutation of all caps, mixed case, wrapping things in brackets and just doing it from the ISQL command line and I never get anything but "[ISQL]ERROR: Could not SQLExecute". I know it's something obvious, but I can't figure it out. Can anyone help me?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20130305/8ea6ae67/attachment.html>

More information about the unixODBC-support mailing list