Subject | [chaitan@nullcube.com: Table creation in transaction] |
---|---|
Author | chaitan@nullcube.com |
Post date | 2004-03-26T02:05:28Z |
Hello All,
I posted this message yesterday but I wasn't sure that it went through.
So I'm sending it again. Sorry if it is a dup.
I've just started using Firebird and it looks good. However, I'm
having some problems with table creation in a transaction.
The following script fails with the error:
kinterbasdb.ProgrammingError: (-204, 'execute.isc_dsql_prepare: Dynamic SQL
Error. SQL error code = -204. Table unknown. TEST. At line 1, column 15..')
However, if I commit the transaction after creating the table everything works
as expected. I was unable to find a documented reason for this behaviour.
Any help would be greatly appreciated.
Thanks,
Chaitan.
<snip>
#!/usr/bin/python2.3
conn = kinterbasdb.connect(
host = "localhost",
database = "/var/lib/firebird/data/testdb.gdb",
user = "sysdba",
password = "masterkey"
)
cursor = conn.cursor()
conn.begin()
cursor.execute("""\
CREATE TABLE test (
test_id INTEGER,
test_value VARCHAR(20)
)""")
cursor.execute("SELECT * FROM test")
</snip>
Chaitan.
--
Chaitan Rogers
chaitan@...
I posted this message yesterday but I wasn't sure that it went through.
So I'm sending it again. Sorry if it is a dup.
I've just started using Firebird and it looks good. However, I'm
having some problems with table creation in a transaction.
The following script fails with the error:
kinterbasdb.ProgrammingError: (-204, 'execute.isc_dsql_prepare: Dynamic SQL
Error. SQL error code = -204. Table unknown. TEST. At line 1, column 15..')
However, if I commit the transaction after creating the table everything works
as expected. I was unable to find a documented reason for this behaviour.
Any help would be greatly appreciated.
Thanks,
Chaitan.
<snip>
#!/usr/bin/python2.3
conn = kinterbasdb.connect(
host = "localhost",
database = "/var/lib/firebird/data/testdb.gdb",
user = "sysdba",
password = "masterkey"
)
cursor = conn.cursor()
conn.begin()
cursor.execute("""\
CREATE TABLE test (
test_id INTEGER,
test_value VARCHAR(20)
)""")
cursor.execute("SELECT * FROM test")
</snip>
Chaitan.
--
Chaitan Rogers
chaitan@...