Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS ODBC and Sybase temporary table

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Charles Hung <chung AT caci.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS ODBC and Sybase temporary table
  • Date: Wed, 16 Nov 2005 19:54:51 -0500

Everyone,

Thanks for your suggestions. I was able to write a quick Perl script using
DBI and DBD-ODBC to perform a quick test.

When I use "Prepare and Execute" on the Create Table #test statement, any
subsequent access to the temporary table #test generates the "table not found
in tempdb" error.

However, using "Execute Immediate" (a.k.a $dbh->do) on the Create Table
statement, the subsequent access to the temporary table works properly.

Thank!

Charles Hung







Charles Hung <chung AT caci.com>



Sent by: freetds-bounces AT lists.ibiblio.org






To

FreeTDS Development Group
<freetds AT lists.ibiblio.org>

11/16/2005 06:25 PM


cc







Subject
Please respond to
Re: [freetds] FreeTDS ODBC and Sybase
temporary table

FreeTDS Development Group
<freetds AT lists.ibiblio.org>


























That brings up a good point.

I wonder what would happen if execute-immediate is used instead of
prepare-and-execute? Too bad I can't find an ISQL setting to do that
(probably need to ask unixODBC mailing list). I can probably write a test app
just to see if that makes differece
though.

Thanks!

Charles Hung




Frediano Ziglio <freddyz77 AT tin.it>
Sent by: freetds-bounces AT lists.ibiblio.org



To

FreeTDS Development Group
<freetds AT lists.ibiblio.org>
11/16/2005 02:35 PM


cc




Subject
Please respond to
Re: [freetds] FreeTDS ODBC and Sybase
temporary table
FreeTDS Development Group
<freetds AT lists.ibiblio.org>









Il giorno mer, 16/11/2005 alle 14.27 -0500, Lowden, James K ha scritto:
> > From: Thompson, Bill D (London)
> > Sent: Wednesday, November 16, 2005 12:54 PM
> >
> > see the following, which is talking about prepared statements in
> > Sybase's ct-library API
> >
> > http://sybooks.sybase.com/onlinebooks/group-cn/cng1250e/guide
>
>
> Is Charles using prepared statements? It looks to me like he's just
> entering queries into isql. He should be able to use temporary tables
> from isql.
>

The problem is that unixODBC isql call always SQLPrepare/SQLExecute...

freddy77


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds







Archive powered by MHonArc 2.6.24.

Top of Page