RE: [Zope] ZODBC and dictionaties
If you want to access the results of ZSQL queries from an ODBC connection, you will have to access them positionally. if your results are in a variable called result_set you can do something like this to list the contents of the first three columns for each row. for row in result_set: print row[0],row[1],row[2] An ugly workaround, but it works. Additionally, the odbc module is single threaded, so if you have a large query that takes two minutes to run, everyone else is blocked until it completes. -----Original Message----- From: Julián Muñoz [mailto:jmunoz@telefonica.net] Sent: Tuesday, September 24, 2002 8:21 AM To: Oliver Marx Cc: zope@zope.org Subject: Re: [Zope] ZODBC and dictionaties Some people use FreeTDS to connecto to Microsoft SQL Server On Sun, 22 Sep 2002, Oliver Marx wrote:
Dear List
I need to use Zope with an SQL server, but but but ZODBC which seems to be the standard DA for SQL server doesn't support dictionaries. Is there a proven solution to this problem?
\Oliver
__o _ \<_ (_)/(_) Saludos de Julián -.- DVD-record Tools for linux http://www.freesoftware.fsf.org/dvdrtools/ _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Jeff Sacksteder wrote:
If you want to access the results of ZSQL queries from an ODBC connection, you will have to access them positionally.
if your results are in a variable called result_set you can do something like this to list the contents of the first three columns for each row.
for row in result_set: print row[0],row[1],row[2]
An ugly workaround, but it works. Additionally, the odbc module is single threaded, so if you have a large query that takes two minutes to run, everyone else is blocked until it completes.
What!?? - You must be joking. I am very troubled by the whole DA situation. ZMySQLDA - seems to work but I haven't *really* tested it. ZOracleDA - I Don't use Oracle so I don't know if it works. ZODBCDA - seems to be very buggy. Zpsycopg - Buggy but improving day by day. Installation stinks, but this is mostly due to lack of features in Python. Installation of a DA should IMHO be as simple as installing ZODBCDA. \Oliver - which is going to write a DA for MSSQL as soon as possible.
On Tue, 24 Sep 2002, Oliver Marx wrote:
\Oliver - which is going to write a DA for MSSQL as soon as possible.
People use zsqlrelayDA and FreeTDS I think, for connecting to MSSQL. -- __o _ \<_ (_)/(_) Saludos de Julián -.- DVD-record Tools for linux http://www.freesoftware.fsf.org/dvdrtools/
If you want to access the results of ZSQL queries from an ODBC connection, you will have to access them positionally.
Sorry, that's not true at all, you can access ZSQL result sets by fieldname just the same through ZODBC as with other DA's (for SQL Server at least). Julian.
participants (4)
-
Jeff Sacksteder -
Julian Melville -
Julián Muñoz -
Oliver Marx