[Zope] connet to MS-SQL database with ython script from with in zope
mbagepll@memphis.edu
mbagepll@memphis.edu
Thu, 14 Feb 2002 14:59:45 -0600
This is a multi-part message in MIME format.
----23a165436df02a62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Hi all,
I am a newbie to zope as well as to python. I want to know if i can
connect to a MS-SQL server database using python script from with in
zope.
I tried to import 'odbc' in the python script (from zope) and i got an
error message saying "import 'odbc' is unauthorised".
My code is:
import odbc
db=odbc.odbc('mydatabase')
cursor=db.cursor()
cursor.execute('select * from mytable')
for i in fetchall()
print i
return printed
I am a bit confused as to how to do this from zope. Is there a odbc
library in zope that i have to import? i need some kind of help...
--Madhavi
----23a165436df02a62
Content-Type: text/x-vcard; name="mbagepll.vcf"; charset=us-ascii
Content-Disposition: attachment; filename="mbagepll.vcf
Content-Description: Card for <mbagepll@memphis.edu>
Content-Transfer-Encoding: 7bit
begin:vcard
n:Bagepalli;Madhavi
tel;home:901-452-8078
tel;work:901-678-1659
org:The University of Memphis;Academic Systems
adr:;;3570 Mynders, Apt # 12;Memphis;TN ;38111;USA
version:2.1
email;internet:mbagepll@memphis.edu
title:Graduate Assistant
end:vcard
----23a165436df02a62--