odbc advice?
William Dode
wilk at flibuste.net
Thu May 9 17:40:09 EDT 2002
Le Thu, 9 May 2002 13:11:48 -0700
"don" <donald.braman at yale.edu> écrivait:
> I'm trying to update table in a SQL Server 2000 database. The following
> (and other similar) code hangs Python about half of the time when I run
> it and then, once hung, will hang every time until I reboot. Does anyone
> have any tips on handling odbc connections in Python? I've been hunting
> around for a while, but haven't found descriptions of hangs like this.
> My reference of choice (Python Web Programming) tells me the ODBC driver
> isn't ready for prime-time. I'm not sure I have any other options,
> though. Any help appreciated. -Don
>
> ++++++++++++++++++++++++
>
> import dbi, odbc
>
> conn = odbc.odbc('mydb')
>
> cur = conn.cursor()
>
> cur.execute("""UPDATE Cases SET Cases.Opinion = NULL WHERE
> updateopinion=1""")
did you try to add
cur.commit()
cur.close()
cur=None
>
>
>
--
William Dodé - Informaticien Indépendant
http://www.flibuste.net
More information about the Python-list
mailing list