469,362 Members | 2,417 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

PyODBC Stored proc calling

Hi to all,

can anyone give me a jump-start about how to call Stored Procedures
from PyODBC ??
I want to execute a very simple testing Stored Procedure on an Sql
Server database.

I started using PyODBC and code like the following

cnxn = pyodbc.connect('DRIVER={SQL
Server};SERVER=hercules;DATABASE=pubs;UID=sa;PWD=p wd'')

for row in cnxn.execute("select au_fname from authors"):
print row.au_fname
cnxn.close()

and based on this, i can now write more complex ad-hoc sql string to
get/update data.
But how i can actually call Stored Procedures and passing parameters to
them ??

Let's say i have the following SP:

create procedure test_bed(@data varchar(100))
as
// do something here.
Any help ??

Thanks in advance

Jan 18 '07 #1
1 4361
No one is using pyodbc ?? :)

Jan 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Rhino | last post: by
3 posts views Thread by mandible | last post: by
reply views Thread by pompeyoc | last post: by
2 posts views Thread by Joe Salmeri | last post: by
reply views Thread by mirandacascade | last post: by
reply views Thread by dj | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.