
March 15th, 2013, 05:13 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 2
Time spent in forums: 1 h 40 m 50 sec
Reputation Power: 0
|
|
|
Python + Database queries question
Hi,
I am fairly new to Python and it is likely there is a very easy solution to this, but I have been trying for days now and just can't solve it so I am hoping someone here can help me.
I am trying to use Python to execute commands on a Sybase database. Running basic selects etc works fine, but I have problems executing the following command:
mount database all from '/opt/manifest_file' with listonly
If I run this manually in an sql prompt I get lots of rows as a result. When I run it through Python (using pyodbc), the command executes fine but I have problems storing the results in a variable.
If I try to fetch the results it tells me the previous SQL was not a query, which is true, but I just can't figure out how to access the results any other way.
Anyone have a good idea on how to solve this?
|