newbie question
kavitha thankaian
kavithapython at yahoo.co.in
Mon Jan 22 03:31:37 EST 2007
Hi,
i wrote a simple script (which follows) to insert a table in the database.i could execute this query and get the result in python shell.but when i open "my sql enterprise manager" i couldnt find the table"animals".it would be so kind of you if someone could help me,,,
import dbi
import odbc
conn=odbc.odbc("DSN=mydatabase;UID=xxx;PWD=yyy")
cursor=conn.cursor()
cursor.execute("Create table animals(parent char(50),child char(50))")
cursor.execute("insert into animals values('lion','cub')")
cursor.execute("insert into animals values('goat','lamb')")
cursor.execute("select * from animals")
print cursor.fetchall()
Rgds
Kavitha
---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070122/b7196d39/attachment.html>
More information about the Python-list
mailing list