Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Strange error 11949 in a simple SQL statement
Fri, Jul 21 2006 5:25 AMPermanent Link

"Ralf Mimoun"
Hi all,

I just got a madExcept report with this exception:

DBISAM Engine Error # 11949 SQL parsing error - Duplicate table or
table correlation name Kunden in SELECT SQL statement at line 1, column 74.

My problem: the SELECT statement is really trivial:

Format('SELECT Nachname, Vorname, Firma, Abteilung, Strasse, Land, PLZ, Ort
FROM Kunden WHERE ID = %0:d', [aID])

And now I ask myself where I can find the second "Kunden" table in that
statement... aID is an integer, of course, and it's 4.22 or 4.24 C/S.

I should get the database today, maybe it's a corrupt table - but I doubt
it. Cosmic rays?

Ralf
Fri, Jul 21 2006 7:57 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< I just got a madExcept report with this exception:

DBISAM Engine Error # 11949 SQL parsing error - Duplicate table or table
correlation name Kunden in SELECT SQL statement at line 1, column 74.

My problem: the SELECT statement is really trivial:

Format('SELECT Nachname, Vorname, Firma, Abteilung, Strasse, Land, PLZ, Ort
FROM Kunden WHERE ID = %0:d', [aID])

And now I ask myself where I can find the second "Kunden" table in that
statement... aID is an integer, of course, and it's 4.22 or 4.24 C/S. >>

Could it be possible that the SQL statement that was executed was not the
one that you think ?  This is a pretty trivial statement, as you stated, so
I can't see DBISAM issuing the error incorrectly unless it was actually
executing something different.

<< I should get the database today, maybe it's a corrupt table - but I doubt
it. Cosmic rays? >>

Database corruption won't have anything to do with this.  This is a parsing
error - DBISAM is saying that the Kunden table name was specified more than
once in the SELECT statement.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jul 21 2006 8:41 AMPermanent Link

"Ralf Mimoun"
Tim Young [Elevate Software] wrote:
....
> Could it be possible that the SQL statement that was executed was not
> the one that you think ?  This is a pretty trivial statement, as you
> stated, so I can't see DBISAM issuing the error incorrectly unless it
> was actually executing something different.

I am 100% sure that it's this statement. The madExcept protocol is detailed
and shows me this:

1) TKasseForm.GetKundenBezeichnung
That thing executes the query and takes the field values to build a full
name. Will be executed a thousand times a day or so, and consists of 3 lines
or so. Only one SELECT statement.

2) TMainDataModule.NewQuery
That function takes the string I posted and creates a query. Runs 10.000
times a day. It is called in GetKundenBezeichnung. And there is only one
call for that in GetKundenBezeichnung.

3) TDataSet.Open
....
15 or so) TQueryStatement.PrepareStatement

16) TQueryStatement.CheckForException
17) TDataSession.CheckForException
18) TDataSession.UnpackException
19) TDataEngine.RaiseError

It is _very_ straight forward. The user was coyping a CD on the local disk
at that time, so he thinks that this might be the reason. That is, of
course, not correct. Let's blame the heat Smile

Ralf
Fri, Jul 21 2006 8:36 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< I am 100% sure that it's this statement. The madExcept protocol is
detailed and shows me this: >>

Okay, but I'm afraid I don't know what to tell you in that case. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Apr 23 2007 5:53 PMPermanent Link

Royce
We had a customer report what appears to be the same problem.  A simple "SELECT * FROM
PartInfo WHERE ACCOUNT_ID = 948" Gave DBISAM Engine error 11949 SQL Parsing error:
Duplicate table to table correlation name PartInfo in SELECT SQL statement at line 1,
column 15.

The above SQL was attempting to read data on internal harddrive using DBISAM ver 4.24
build 9.  It would read the above then generate a SQL statement that writes the same data
to a remote database via a VPN.  

Attempting the transfer a second time worked without error.

Have you had any other reports of this?  Is there a fix, workaround?

Royce

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Ralf,

<< I am 100% sure that it's this statement. The madExcept protocol is
detailed and shows me this: >>

Okay, but I'm afraid I don't know what to tell you in that case. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 25 2007 8:33 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Royce,

<< We had a customer report what appears to be the same problem.  A simple
"SELECT * FROM PartInfo WHERE ACCOUNT_ID = 948" Gave DBISAM Engine error
11949 SQL Parsing error:
Duplicate table to table correlation name PartInfo in SELECT SQL statement
at line 1, column 15.

The above SQL was attempting to read data on internal harddrive using
DBISAM ver 4.24 build 9.  It would read the above then generate a SQL
statement that writes the same data to a remote database via a VPN.

Attempting the transfer a second time worked without error. >>

Are you sure that the SQL statement given above is the one that is causing
the error and not a different statement ?  There really is no way for the
above SQL statement to cause that error.  I could try it here a million
times, and it would work every time.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 25 2007 2:27 PMPermanent Link

"Robert"

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:4652C914-889C-43D4-859B-BBDDC50F85F3@news.elevatesoft.com...
> above SQL statement to cause that error.  I could try it here a million
> times, and it would work every time.
>

Prove it.

Robert

Fri, Apr 27 2007 7:36 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robert,

<< Prove it. >>

Prove what ?  That a simple SQL statement works a million times here ?  How
would you propose that I prove it to everyone ?  Would a simple project that
runs such a statement 1 million times suffice ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Apr 27 2007 9:45 AMPermanent Link

"Robert"

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:DCCADA06-72F6-4B73-8119-8D30AA8F3FEB@news.elevatesoft.com...
> Robert,
>
> << Prove it. >>
>
> Prove what ?  That a simple SQL statement works a million times here ?
> How would you propose that I prove it to everyone ?  Would a simple
> project that runs such a statement 1 million times suffice ?
>

No. You have to run it manually one million times.

R
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Mon, Apr 30 2007 3:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robert,

<< No. You have to run it manually one million times. >>

So, when will you be stopping by the office to supervise ?  It's no good
unless it can be confirmed by an impartial outside party. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image