Hi,
To answer your questions, yes, the script works at the command line.
The only Python on my machine is ActivePython 2.1.1.
I have got it the script working in Komodo though. For some reason, if I
execute a SELECT following the INSERT using the same cursor, the
database is updated.
If you have any ideas why this is (especially if I'm doing something
wrong), I'm all ears.
Thanks
> When I run the simple (Access XP via ODBC) database test script
below,
> interactively and in PythonWin it works but in Komodo 1.1 it doesn't.
> A '1' result is returned but the row isn't inserted.
>
> import dbi, odbc
> sqlInsert = "INSERT INTO table_name(field_name) VALUES ('blah')"
> myconn = odbc.odbc('DSN_Name') cursor = myconn.cursor()
> cursor.execute(sqlInsert)
> myconn.commit()
> cursor.close()
> myconn.close()
>
> Any ideas?
Does the script work correctly when you run in from the commandline i.e.
python yourscript.py? Also, do you have more than one version of Python
installed?
Cheers,
Brian
--__--__--
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython
End of ActivePython Digest
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython