#1  
Old 10th April 2012, 01:33 AM
Wolfgang
 
Posts: n/a
Default SQL Error

Just updated from 3.09 to 3.1004 and am getting an error "Table already
exists", when re-using a ##Temp.

Tables and SQL in binaries under same Subject.
  #2  
Old 10th April 2012, 10:17 PM
Wolfgang
 
Posts: n/a
Default Re: SQL Error

Should mention: Win 7 64 Bit, DXE2 and Nexus 3.1004

On 09.04.2012 4:33 PM, Wolfgang wrote:
> Just updated from 3.09 to 3.1004 and am getting an error "Table already
> exists", when re-using a ##Temp.
>
> Tables and SQL in binaries under same Subject.

  #3  
Old 11th April 2012, 12:41 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: SQL Error

> Just updated from 3.09 to 3.1004 and am getting an error "Table
> already exists", when re-using a ##Temp.


Try explicitly dropping it. For 3.10.04, a change in the SQL engine
causes it call CloseInactive... internally less often.

--
Eivind Bakkestuen [NDD]
  #4  
Old 11th April 2012, 01:31 PM
Wolfgang
 
Posts: n/a
Default Re: SQL Error

I did that already for this one instance. However, there are a lot of
other Queries, which I would have to trace in 105 different modules.

I would have thought, that "select into" would automatically discard a
previousely existing Table with the same name?

I just fiddled and found the following:

select * into ##T1 from Grvs;
select * into ##T2 from ##T1;
select * into ##T1 from Towing;

reproduces the error,

select * into ##T1 from Grvs;
select * into ##T1 from Towing;
select * into ##T2 from ##T1;

doesn't.

It seems, that this error only occurs, when a Temp Table is used (Line 2
in first example seems to somehow persist ##T1) before trying to use it
again.

Wouldn't it be easier, to first close a Table automatically, when
"Select into" is used?

On 10.04.2012 3:41 PM, Eivind Bakkestuen [NDD] wrote:
>> Just updated from 3.09 to 3.1004 and am getting an error "Table
>> already exists", when re-using a ##Temp.

>
> Try explicitly dropping it. For 3.10.04, a change in the SQL engine
> causes it call CloseInactive... internally less often.
>

  #5  
Old 13th April 2012, 06:42 PM
Wolfgang
 
Posts: n/a
Default Re: SQL Error

Maybe one could create something like an Eventhandler "OnSelectInto" ?

On 10.04.2012 3:41 PM, Eivind Bakkestuen [NDD] wrote:
>> Just updated from 3.09 to 3.1004 and am getting an error "Table
>> already exists", when re-using a ##Temp.

>
> Try explicitly dropping it. For 3.10.04, a change in the SQL engine
> causes it call CloseInactive... internally less often.
>

  #6  
Old 13th April 2012, 07:05 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: SQL Error

> Maybe one could create something like an Eventhandler "OnSelectInto" ?

No; we will revisit the change that was done for 3.10.04.

--
Eivind Bakkestuen [NDD]
  #7  
Old 8th May 2012, 04:25 PM
Wolfgang
 
Posts: n/a
Default Re: SQL Error

I am planning to roll out the updated version of our app, using Nexus
10.04, to more than 700 Clients.

Have tried to catch as many instances of "Table already exists" as I could.

Are there perhaps any updates available, which address this issue and
which I could apply, before I commit my Clients to this update?

Kind Regards
Wolfgang

On 13.04.2012 10:05 AM, Eivind Bakkestuen [NDD] wrote:
>> Maybe one could create something like an Eventhandler "OnSelectInto" ?

>
> No; we will revisit the change that was done for 3.10.04.
>

  #8  
Old 8th May 2012, 08:54 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: SQL Error

> Are there perhaps any updates available, which address this issue and
> which I could apply, before I commit my Clients to this update?


Thorsten is currently working on this, but it is a complex task to get
correctly done and I can't predict how soon it will be done.



--
Eivind Bakkestuen [NDD]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Error: NexusDB: <unnamed TnxQuery instance>: Query execution failed Warren nexusdb.public.support.adoprovider 1 8th April 2010 02:55 PM


All times are GMT +11. The time now is 09:58 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.