----- Jeff Urlwin wrote -----
DBD::ODBC shouldn't be creating a new connection. What version of DBD::ODBC are you
using?
----- End -----
Yeah, it shouldn't be creating a new connection, and I'm not doing it in my code (the
code I included in my first message was the whole shebang). I'm using version 0.28 of
DBD::ODBC.
----- Jeff mentioned -----
Some of the more recent versions use SQLExecDirect when using do(), instead of the
full prepare, etc. Is it possible that SQLExecDirect causes a problem (I doubt it).
----- End -----
Well, if I replace the dos with prepare, etc. as follows:
----- Replace lines 17 through 21 with this -----
my $sth = $dbh->prepare('CREATE TABLE #foo (id INT PRIMARY KEY, val CHAR(4))')
or die $dbh->errstr;
my $rv = $sth->execute;
$sth = $dbh->prepare("INSERT INTO #foo (id, val) VALUES (1, 'foo')")
or die $dbh->errstr;
$rv = $sth->execute;
----- End -----
I still have the same problem.
----- Jeff asked -----
Is it possible that you have to quote the table name when using this syntax?
----- End -----
Nope, that's the correct syntax.
- Kennis