Board index » delphi » large sql statement causes a GPF

large sql statement causes a GPF

hi everyone!

i am dynamically constructing a large sql statement with an "IN" clause...
when the "IN" clause get's too big the sql actually GPF's the machine, has
anyone encountered a similar problem with large sql statments and if so is
there a way to avoid them?

note: i am using delphi 1.0 16-bit with the Borland Database Engine 2.5.

thanks for any help, mark

 

Re:large sql statement causes a GPF


In article <51nmbg$...@newsbf02.news.aol.com>, Geeky0010
<geeky0...@aol.com> writes

Quote
>hi everyone!

>i am dynamically constructing a large sql statement with an "IN" clause...
>when the "IN" clause get's too big the sql actually GPF's the machine, has
>anyone encountered a similar problem with large sql statments

Yes.
Quote
> and if so is
>there a way to avoid them?

No. It is a known bug that Borland are reluctant to talk about. It may
be fixed in future issues of the BDE but don't hold your breath. The OR
operator in WHERE clauses can cause similar problems.

--
Barney Tyrwhitt-Drake

Re:large sql statement causes a GPF


Quote
Barney Tyrwhitt-Drake <bar...@tdrake.demon.co.uk> wrote:
>>i am dynamically constructing a large sql statement with an "IN" clause...
>>when the "IN" clause get's too big the sql actually GPF's
>> is
>>there a way to avoid them?

From: "Ross U Martin" <mart...@thorn-emi.co.uk>
If you've got lots of items in the where in [] clause you're giving the
SQL parser a very hard time - much better to insert the key values into a
temporary table and then join that to the table that you were doing the
WHERE against.

Derek.
--
                                                      dho...@csir.co.za
                                               No opinions. Just facts.
                           http://www.cs.wits.ac.za/faq/sf/sfsafaq.html
                        "One warp core breach can really ruin your day."

Re:large sql statement causes a GPF


In article <51nmbg$...@newsbf02.news.aol.com>, geeky0...@aol.com says...

Quote

>hi everyone!

>i am dynamically constructing a large sql statement with an "IN" clause...
>when the "IN" clause get's too big the sql actually GPF's the machine, has
>anyone encountered a similar problem with large sql statments and if so is
>there a way to avoid them?

>note: i am using delphi 1.0 16-bit with the Borland Database Engine 2.5.

>thanks for any help, mark

Hello,

Have you tried placing the SQL statement in the SQL property of the query
before running the program to see if it still causes the GPF?

Just a thought

Chris <csu...@acxiom.com>

Other Threads