perl-dbi #temp table created using handle not accessible when accessed via ->do() with the same handle

--_000_299D5BAC15359040BA3E826C52DFE2F00873960DE6HYDMBX4winmai_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi DBI-users,

I am facing this problem perl DBD::ODBC rollback ineffective with AutoCommi=
t enabled at<http://stackoverflow.com/questions/6938036/perl-dbdodbc-rollba=
ck-ineffective-with-autocommit-enabled-at> and while looking at the problem=
 , I found that a very basic thing is failing with Perl::DBI using DBD::ODB=
C on sql server. But i am not sure if this wont happen with any other drive=
r.
The problem is that when I create a #temp table using $dbh->do and when i t=
ry to access the same #temp table using another $dbh->do, i am getting the =
below error. Also this does not happen all the time, but only intermittentl=
y.
Invalid object name '#temp'
$dbh->do("SELECT  ... INTO #temp FROM ...");
$dbh->do("INSERT INTO ... SELECT ... FROM #temp");

The second do fails with 'Invalid object name '#temp''
-Gopal




--_000_299D5BAC15359040BA3E826C52DFE2F00873960DE6HYDMBX4winmai_--
0
Gopalakrishnan
8/4/2011 12:57:25 PM
perl.dbi.users 11085 articles. 1 followers. Follow

2 Replies
1279 Views

Similar Articles

[PageSpeed] 46

Maybe it just doesn't like the # character in the table name.

-Will


> -----Original Message-----
> From: Anantharaman Sekaripuram, Gopalakrishnan
> [mailto:Gopalakrishnan.Sekaripuram.Anantharaman@deshaw.com]
> Sent: 4 August 2011 08:57
> To: dbi-users@perl.org
> Subject: perl-dbi #temp table created using handle not accessible when
> accessed via ->do() with the same handle
>=20
> Hi DBI-users,
>=20
> I am facing this problem perl DBD::ODBC rollback ineffective with
> AutoCommit enabled at<http://stackoverflow.com/questions/6938036/perl-
> dbdodbc-rollback-ineffective-with-autocommit-enabled-at> and while
> looking at the problem , I found that a very basic thing is failing
> with Perl::DBI using DBD::ODBC on sql server. But i am not sure if
this
> wont happen with any other driver.
> The problem is that when I create a #temp table using $dbh->do and
when
> i try to access the same #temp table using another $dbh->do, i am
> getting the below error. Also this does not happen all the time, but
> only intermittently.
> Invalid object name '#temp'
> $dbh->do("SELECT  ... INTO #temp FROM ...");
> $dbh->do("INSERT INTO ... SELECT ... FROM #temp");
>=20
> The second do fails with 'Invalid object name '#temp''
> -Gopal
>=20
>=20

0
rutherw
8/4/2011 2:14:43 PM
On 04/08/11 13:57, Anantharaman Sekaripuram, Gopalakrishnan wrote:
> Hi DBI-users,
>
> I am facing this problem perl DBD::ODBC rollback ineffective with AutoCommit enabled at<http://stackoverflow.com/questions/6938036/perl-dbdodbc-rollback-ineffective-with-autocommit-enabled-at>  and while looking at the problem , I found that a very basic thing is failing with Perl::DBI using DBD::ODBC on sql server. But i am not sure if this wont happen with any other driver.
> The problem is that when I create a #temp table using $dbh->do and when i try to access the same #temp table using another $dbh->do, i am getting the below error. Also this does not happen all the time, but only intermittently.
> Invalid object name '#temp'
> $dbh->do("SELECT  ... INTO #temp FROM ...");
> $dbh->do("INSERT INTO ... SELECT ... FROM #temp");
>
> The second do fails with 'Invalid object name '#temp''
> -Gopal
>
>
>
>
Just for others on this list, this question was first asked on stackoverflow at:

http://stackoverflow.com/questions/6941197

I have provided and answer on stackoverflow and am awaiting a trace file.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
0
martin
8/4/2011 3:55:41 PM
Reply:

Similar Artilces:

Accessing temp tables created by other user
Hi, How do I access the temp table, (the one created with # prefix in tempdb) created by other user. - Thanks, Arvind. You can't. -bret Arvind wrote: > Hi, > > How do I access the temp table, (the one created with # prefix in tempdb) > created by other user. > > - Thanks, > Arvind. "Bret Halford" <bret@sybase.com> wrote in message news:3C506F55.12CBEF76@sybase.com... > You can't. .... unless you want to 'create table's in tempdb that are there for the duration between ASE reboots. -- Pablo Sanc...

Inserting Row into Access 2000 Table Using DBI:ODBC
Hello, I'm trying to write a program that will update a simple Access 2000 table. Whenever I try to run the insert statement, though, I get the following error back: " DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. (SQL-S1000)(DBD:st_execute/SQLExecute err=-1) at dbi_ins_test.pl line 56. " This is what the prepared statement looks like: " my $sth5 = $dbh->prepare("insert into dbi_test ( district_cd ) values (?)") or die "Cant prepare jcdb insert" . $dbh->errst...

[perl5-dbi/dbi] b80de3: Make DBI::_handles return only the outer handle in...
----==_mimepart_5286b894b9afd_601c6e3d54169385 Date: Fri, 15 Nov 2013 16:13:08 -0800 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <5286b894ba6b0_601c6e3d541694af@hookshot-fe2-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/dbi Commit: b80de3eb5d5bd1c469391218dbc91e9f5895e4a5 https://github.com/perl5-dbi/dbi/commit/b80de3eb5d5bd1c469391218dbc91e9f5895e4a5 Author: Tim Bunce <Tim.Bunce@pobox.com> Date: 2013-11-14 (Thu, 14 Nov 2013) Changed paths: ...

Users unable to delete records when accessing SQL 2005 tables via MS Access 2007
The background: we have a number of databases in SQL 2005, which our primary users access via MS Access 2007. For some reason, in some (but not all) newer tables in these databases, our users are unable to modify or delete records, even though the users have all the permissions they should need to do so. In one case, the user will get a message that someone else is accessing the same data at the time, even though nobody is. Another user gets no error message, her machine just beeps at her and does nothing. We're completely stuck - does anyone have any ideas as to what might be causi...

Accessing MS Access through the DBI ODBC
Hi all, I am trying to access an MS Access database via perl DBI and I am unable = to. I checked the security and there is only one 'Admin' user with no = password and I use that in my connection string. However, I cannot = connect. Please help. Regards, Javier Moreno Hi Javier, > I am trying to access an MS Access database via perl DBI and I am unable to. I checked the security and there is only one 'Admin' user with no password and I use that in my connection string. However, I cannot connect. Please help. > 1. Create an ODBC connection via %Sys...

Create access table using sql table field
 hi friends , i need create mdb file with table and data , the data will come from sql server 2005 table , for example i have table employee table contain some fields like name mobile number and others ,, now i  need to create access mdb file with table and data , data is mobile numbers of employee(just only one field) ,  i m using ASP.net C# 2.0, plz help me yarTHANKS FOR ADVANCE     Hello Raghavendra,                          &nbs...

Subclassing DBI
Hi, I'm trying to subclass DBI, but I'm having problems accesing DBI::st attributes. Say I want to override the DBI::st::execute() function to add the ParamValues attribute contents that is missing with using the MySQL driver. sub execute { my $Self = shift; my @Bound = @_; my %ParamValues; my $i; unless ($Self->{ParamValues}) { for $i (0 .. $#Bound) { $ParamValues{$i} = $Bound[$i]; print STDERR $Bound[$i] . "\n"; } $Self->{ParamValues} = \%ParamValues; } return $Self -> SUPER::execute (@Bound); } ...

Dbi objects to access an MS Access Db
I'm having a problem getting Tran-ide to recognize my access 2000 database. I've created a system dsn called Midas and created the attached nnsyreg.dat file and put it into e:\sybase\ImpactClient-5_3\config directory. I've also put this file in my projects directory and still get the following message. Unable to connect to session Midas. Any Advice? Thanks Brent begin 666 nnsyreg.dat M4V5S<VEO;BY-:61A<PT*"4Y.3U1?4TA!4D5$7TQ)0E)!4ED@/2!D8G0R-VUS M;V1B8PT*"4Y.3U1?1D%#5$]265]&54Y#5$E/3B ]($Y.4V5S3T1"0T9A8W1O M<GD-"@E.3E]315-?4T525D52(#T@24U...

DBI Threaded use access?
--f46d042dfee179415504cbba336d Content-Type: text/plain; charset=ISO-8859-1 Hi DBI-Users, I have a simple Perl program to open a file, db, serially read file, write file records to db, close db, close file. if, between the db open & close, given a single dbh, i create multiple threads, each reading a segment of the file and asynchronously writing to db using the same dbh, is that ok? TIA, jackc... --f46d042dfee179415504cbba336d-- On Oct 10, 2012, at 1:21 PM, Jack Craig wrote: > Hi DBI-Users, > > I have a simple Perl program to open a file, db, serially...

[perl5-dbi/DBI-Test] a2d1b2: create separate tests for DBI and DBI::Mock ...
----==_mimepart_51f946a54bb1b_2af891bd4c100430 Date: Wed, 31 Jul 2013 10:17:25 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-ID: <51f946a54c721_2af891bd4c100582@hookshot-fe3-pe1-prd.aws.github.net.mail> Branch: refs/heads/master Home: https://github.com/perl5-dbi/DBI-Test Commit: a2d1b22d134be0ca353e0f0b312fb14da24c798e https://github.com/perl5-dbi/DBI-Test/commit/a2d1b22d134be0ca353e0f0b312fb14da24c798e Author: Jens Rehsack <sno@netbsd.org> Date: 2013-07-31 (Wed, 31 Jul 2013) Changed ...

Re: Re: Accessing MS Access through the DBI ODBC
> From: Kevin Carothers <kevindotcar@gmail.com> > Date: 2005/03/30 Wed PM 06:44:48 CST > 1. Create an ODBC connection via %SystemRoot%\system32\odbcad32.exe > Call the database connect name "ODBCName" > > 2. In your Perl code add: > [---] > use DBI; > [---] > $dbh = DBI->connect("dbi:ODBC:ODBCName",'',''); > [---] Just my opinion, but I don't think this is good advice. For one, it creates extra administration on the system, by forcing the user/programmer /sysadmin/webadmin to ...

How to access a control using its window handle
Hi, I am new to PowerBuilder after more than 10 years of Delphi and can't figure this out: If I call a WIN32-Function like for example FindWindow it delivers a window handle. Using Delphi I knew how to use this handle and "cast" it to my own Window-Class so that I could access its properties and methods. How can I do this in PowerBuilder? I know there is function called handle() which gives me the handle of a PowerBuilder-Control, but i need the reverse function... window myWindow hwnd = FindWindow( 0, "Main Window") if hwnd <> 0 then ...

Using an Access table as the user list.
I'm trying to create a site, where the user would enter his username and password.The user's "Username" and "Password" would then be compared to a table in an Access database. I can't seem to find a way of connecting them together.  Any ideas? You can use ADO.Net to access the Access database and use a query to check if the username and password exists in the Access database.Tutorial over ADO.NetIf you use ASP.Net 2.0, you can use the Membership feature to do that without writing a single line of code./Fredrik Normén - fredrikn @ twitterMicro...

DBI Handles
------_=_NextPart_001_01C19AB1.DA2C4DB0 Content-Type: text/plain; charset="ISO-8859-1" Is there any way of accessing current handles through a built-in collection of some kind ? > Mark Buckle, Database Administrator, Implementation - Intech Solutions > DDI: 0113 2206766 Fax:0113 2444201 > Email:MBuckle@intechsolutions.co.uk > Website:http://www.intechsolutions.co.uk/ > > > ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use ...

What driver to use with DBI for access 97
Just getting started trying to pull some data from a fairly simple access 97 database. What driver do I need to use to connect in this string.. my $dbh = DBI->connect('DBI:?????:framestats.mdb'); I just need to pull a few bits and pieces of data out of this database for use in another script. Nothing overly complicated. Chris Benco chris@austinpowder.com Hi- I have used ODBC - works well. Post again if you need samples/help setting up ODBC. Aloha => Beau. -----Original Message----- From: Chris Benco [mailto:Chris.Benco@austinpowder.com] Sent: Thu...

Web resources about - perl-dbi #temp table created using handle not accessible when accessed via ->do() with the same handle - perl.dbi.users

Accessible tourism - Wikipedia, the free encyclopedia
Accessible tourism is the ongoing endeavour to ensure tourist destinations, products and services are accessible to all people, regardless of ...

Facebook Updates Graph API To Make Data More Accessible To Developers
Developers were pleased with Thursday’s improvements to Facebook’s Graph API , which allows them to access data in the social graph quicker and ...

Making Facebook Accessible for Everyone
von Kathy H. Chan, Montag, 6. April 2009 um 16:02 Carl Augusto is the President and CEO of the American Foundation for the Blind, a U.S.-based ...

Accessible Podcast (@accessibleshow) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Frank & Oak - Premium, Accessible Menswear on the App Store on iTunes
Get Frank & Oak - Premium, Accessible Menswear on the App Store. See screenshots and ratings, and read customer reviews.

Keep Abortion Safe, Legal & Accessible
Explore World Can't Wait's photos on Flickr. World Can't Wait has uploaded 2025 photos to Flickr.

Boehner, House GOP Outline Plan to Make Health Care More Affordable & Accessible for All Americans ...
House Republican Leader John Boehner (R-OH) today issued the following statement after Members of the House GOP Health Care Reform Solutions ...

Security fears over exposure of web-accessible printers
Google exposes thousands of HP printers - many of them at universities, including a number in Australia - that aren't protected, allowing anyone ...

New accessible tram stops not on the level for those most in need in Melbourne
Melbourne's expanding fleet of low-floor trams is being allocated to tram routes that lack wheelchair-accessible stops, while accessible tram ...

Government: Observatory makes stars more accessible
Travelling to Mars? You no longer have to walk.

Resources last updated: 12/9/2015 7:50:09 AM