Board index » delphi » Query.SQL size limit?

Query.SQL size limit?

Quote
Bill Artemik wrote:

> This leads me to believe I have hit a limit of the BDE?

        Nope.  But it's entriely possible you hit a limit of dBase.  I wouldn't
know about that.  But you can certainly run queries > 300 characters
against InterBase via the BDE.

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
     Delphi/InterBase WebLog: http://delphi.weblogs.com

 

Re:Query.SQL size limit?


I have a query that is rather long. The process seems to run just fine
until I pass the 300 line mark. Then I get errors back from the BDE
"Invalid use of Keyword" and it returns a partial SQL statement.

These SQL UNIONS are generated from a function loop dynamically

e.g.
   for i := 0 to storelist.count-1 do begin
      Query1.SQL.Add(' SELECT field2, StoreList[i] as STORE, field3')
      Query1.SQL.Add('FROM myTable');
      Query1.SQL.Add('Where Field1 = SomeValue');
      Query1.SQL.Add('UNION ALL')
  end;

Anyway, StoreList can be from 1 to 100 stores long. Up to 300 lines I
seem to be OK with this running but when I hit that next store and run
the assembled SQL I get "Invalid Use of Keyword
    , field3
   FROM myTable "

This leads me to believe I have hit a limit of the BDE?

This is in Delphi 5, BDE 5.11 and a TQuery run locally against a DBase
table.

Bill

----------------------
Bill Artemik
Programmer / Analyst
b...@droste1.com

"He who procrastinates

Re:Query.SQL size limit?


It's not 300 characters... it's 300 LINES of SQL.

On Fri, 17 Aug 2001 14:04:01 -0400, "Craig Stuntz (TeamB)"

Quote
<cstuntz@no_spam.vertexsoftware.com> wrote:

>Bill Artemik wrote:

>> This leads me to believe I have hit a limit of the BDE?

>    Nope.  But it's entriely possible you hit a limit of dBase.  I wouldn't
>know about that.  But you can certainly run queries > 300 characters
>against InterBase via the BDE.

>    -Craig

----------------------
Bill Artemik
Programmer / Analyst
b...@droste1.com

"He who procrastinates

Re:Query.SQL size limit?


Perhaps the problem is in TStrings class.
Try saving the SQL statement in text file, and the loading it at once with
LoadFromFile();

--
Greetings / Pozdrav,

===== ___                        = Milan Babuskov, Support Engineer
==== /     /  /   __   ___  _/_ == EUnet - YUnet International
=== /---  /  /  /  /  /__   /  === Strosmajerova 24, 24000 Subotica, YU
== /___  /__/  /  /  /__   /  ==== phone: +381 24 556 272
==                             === http://www.EUnet.yu/
== Connecting Europe since 1982 == e-mail: mil...@Yugoslavia.EU.net

Quote
Bill Artemik <B...@droste1.com> wrote in message

news:3b7d5b9e.21482890@newsgroups.borland.com...
Quote
> I have a query that is rather long. The process seems to run just fine
> until I pass the 300 line mark. Then I get errors back from the BDE
> "Invalid use of Keyword" and it returns a partial SQL statement.

Re:Query.SQL size limit?


Quote
Milan Babuskov wrote:

> Perhaps the problem is in TStrings class.

        Limit there is 2 GB.  Doubt you hit it.  :)

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
     Delphi/InterBase WebLog: http://delphi.weblogs.com

Re:Query.SQL size limit?


Quote
Bill Artemik wrote:

> It's not 300 characters... it's 300 LINES of SQL.

        Sorry I misread what you said, but it's still not a BDE limitation.

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
We're hiring: http://www.vertexsoftware.com/careerops.htm#sd
     Delphi/InterBase WebLog: http://delphi.weblogs.com

Re:Query.SQL size limit?


Hm, not the limit, rather the bug...If you're interested I can elaborate,
but that is not a bde issue.

--
Greetings / Pozdrav,

Milan Babuskov

Quote

> Limit there is 2 GB.  Doubt you hit it.  :)

> -Craig

Other Threads