Hello,
I am using DBI 1.51 and DBD::ODBC 1.13, connecting to MSSQL2005.
Executing following statements:
$sth = $dbh->prepare('create table #foo (a int not null)');
$sth->execute();
$sth = $dbh->prepare('insert into #foo values (1)');
$sth->execute();
generate an error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name '#foo'.
So, the temporary table "disapears".... (I tested it on Sybase, using DBD::Sybase, too, there is no an error). Since the two statements are dynamically created (between come other statements), I cannot execute in one batch
$sth = $dbh->prepare('create table #foo (a int not null)
insert into #foo values (1));
$sth->execute();
at once...
How can I avoid this problem?
Regards!
Andon
---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
Thread Next