CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
create table is not allowed with in a multi statement transaction

 



sudha
New User

Jan 23, 2008, 1:50 AM

Post #1 of 2 (3112 views)
create table is not allowed with in a multi statement transaction Can't Post

hi all,

This is the code I am trying to execute.

my $sth=$dbh->prepare("create table test(id integer)");
$sth->execute();

And I am getting the error as "create table command is not allowed with in a multi-statement transaction".

But I am not issuing multiple statements and I didn't keep it in a transaction. Then why is is that I am getting this error.

When I searched about this error I came to know that if "ddl in tran" is set to true then this error can be handled. Is there no other solution to this one, like executing as a single statement and not keeping it in a transaction.

Can someone help me out in this.

Thanks in advance.

--Sudha


Keerthy
New User

Feb 8, 2008, 2:56 AM

Post #2 of 2 (2972 views)
Re: [sudha] create table is not allowed with in a multi statement transaction [In reply to] Can't Post

Sudha,

It worked absolutely fine for me.
Please check the way u created the db handle!

Regards
Keerthy

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives