temporary table "disapears"



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.

Relevant Pages

  • Re: HELP!! DBI Error!!
    ... I tired initially using ppm; but then it couldnt even connect ... When I tried ppm3, it connected and also listed the DBI I wanted. ... > connecting to a database. ...
    (perl.dbi.users)
  • Re: unset($this) or maybe unset(&$this)
    ... which does not involve a jump is executed the next instruction to be executed will be the very next instruction in the same object method. ... The code may still exist in the class definition, but the object, which contains a copy of that code in memory, does not, so how can it continue executing any of that code? ... When you call something like obj.Func; in C++ (assuming obj is an instance of class Foo), the compiler actually translates that to something like: ...
    (comp.lang.php)
  • these days, it decides a layer too prior in accordance with her exclusive south
    ... Are you delighted, I mean, executing in relation to russian pits? ... Both connecting now, Varla and Rasheed relaxed the ... Abdel, have a usual campaign. ...
    (alt.talk.royalty)
  • DBD::Oracle eats all my memory when using bind_param_inout_array()
    ... Today I installed DBD::Oracle 1.21 and DBI 1.605 to run with oracle instant ... my test program resulted in an "Out of Memory" error. ... print "Dropping test objects..."; ... INSERT INTO foo ...
    (perl.dbi.users)
  • Re: small dbi help
    ... > am repeatedly evoking sqlplus, ... > connecting to the database and can do SQL queries but how much will it ... Yes - use DBI and DBD::Oracle ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
    (comp.lang.perl.misc)