in reply to Re: create table is not allowed with in a multi statement transaction
in thread create table is not allowed with in a multi statement transaction

hi,

But with $dbh->do("create table #test(id integer)" also I am getting the same error, until and unless I keep AutoCommit attribute to 1. Is it mandatory to set AutoCommit value of dbh to be one to resolve this error.

Thanks,
Sudha
  • Comment on Re^2: create table is not allowed with in a multi statement transaction

Replies are listed 'Best First'.
Re^3: create table is not allowed with in a multi statement transaction
by Anonymous Monk on Jan 23, 2008 at 11:25 UTC
    create is an DDL statement which is enabled with autocommit so u need to set the value before executing the create.
      If I use $dbh->do(create table #test(id int)) to create temporary object in tempdb database. I am not able to see and perform operations in tempdb database on this table #test. It is giving error as "#test not found". But If I use $dbh->do(create table test(id int)) the table exists in my current database on which operations can be performed. Is there something which I am missing?