On Tuesday 01 August 2006 13:30, Piotr Ozarowski wrote:
> Just wondering... could you check that psycopg is working at all
> (without sqlalchemy)
>
> try to test it with this code:
>
> #!/usr/bin/python
> from psycopg import connect
> conn = connect("dbname=xxx user=yyy password=zzz")
> curs = conn.cursor()
> curs.execute("CREATE TABLE testtable(testcolumn char(8))")
> curs.execute("INSERT INTO testtable VALUES ('a')")
I added a "conn.commit()" at the end because otherwise nothing happened.
The script ran well and did what is was supposed to. Both with or without
psycopg2.
Christoph
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]