BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sql don't wok with record over 9161????

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Lauro Lima
Guest





PostPosted: Mon Jun 23, 2003 12:53 pm    Post subject: Sql don't wok with record over 9161???? Reply with quote



Hi,, everybody,,,

I'm having some problem with this code.
in my DBF file I have 9162 records.
When I run the above code. It give me:
Acces violation at address 0000007. Read Of address FFFFF.

What I can't understand is? Why if I delete one(1) record from
the DBF file it run normaly. So with 9161 record it works.

I Say that because I try deleting the File First record of . After
I delete last one. Both way work ok. but not more then 9162 record.


With qryTotal Do Begin
Sql.Clear;
Sql.Add('Select Sum(C.TotCub) As TotaCubC From Estufas E');
Sql.Add('FULL OUTER JOIN ClassiHE C ON ( C.sequen = E.gradea )');
Sql.Add('Where Extract(YEAR FROM E.DatSai) = 2003'+
' AND Extract(MONTH FROM E.DatSai) = 6'+
' AND Extract(DAY FROM E.DatSai) = 1 ');
Active := True;
End;

I Already try LEFT OUTER JOIN,, but the Access violation occurs,,,,,
If anybody could give any hint... I say thanks.....

Lauro Lima



Back to top
mkm
Guest





PostPosted: Tue Jun 24, 2003 7:27 pm    Post subject: Re: Sql don't wok with record over 9161???? Reply with quote




"Lauro Lima" <Lauro123 (AT) yahoo (DOT) com> wrote

Quote:

What I can't understand is? Why if I delete one(1) record from
the DBF file it run normaly. So with 9161 record it works.

With qryTotal Do Begin
Sql.Clear;
Sql.Add('Select Sum(C.TotCub) As TotaCubC From Estufas E');
Sql.Add('FULL OUTER JOIN ClassiHE C ON ( C.sequen = E.gradea )');
Sql.Add('Where Extract(YEAR FROM E.DatSai) = 2003'+
' AND Extract(MONTH FROM E.DatSai) = 6'+
' AND Extract(DAY FROM E.DatSai) = 1 ');
Active := True;
End;


Try this:

With qryTotal Do Begin
Sql.Clear;
Sql.Add('Select Sum(C.TotCub) As TotaCubC From Estufas E');
Sql.Add('FULL OUTER JOIN ClassiHE C ON ( C.sequen = E.gradea )');
Sql.Add('Where E.DatSai = ''01-JUN- 2003''');
Open;
End;





Back to top
Lauro Lima
Guest





PostPosted: Wed Jun 25, 2003 10:22 am    Post subject: Re: Sql don't wok with record over 9161???? Reply with quote




"mkm" <a@b.com> escreveu na mensagem
news:3ef8a60e$1 (AT) newsgroups (DOT) borland.com...
Quote:
With qryTotal Do Begin
Sql.Clear;
Sql.Add('Select Sum(C.TotCub) As TotaCubC From Estufas E');
Sql.Add('FULL OUTER JOIN ClassiHE C ON ( C.sequen = E.gradea )');
Sql.Add('Where E.DatSai = ''01-JUN- 2003''');
Open;
End;



Thank Mkm....

But I still have the same problem.
What I'm really impressed is why whether I Delete one, just one
record from any part of the file (begin, midle or end) it works.
I remember that this files isn't on the Filter range.

I was thinking about File Header. But didn't find an answer yet.

I need to say that this message occurs on Delphi SQL explorer either.

If somebody wants I can send the dbfs for testing, it is about
800mb.....


Thanks for all
Lauro Lima.



Back to top
mkm
Guest





PostPosted: Wed Jun 25, 2003 4:32 pm    Post subject: Re: Sql don't wok with record over 9161???? Reply with quote


"Lauro Lima" <Lauro123 (AT) yahoo (DOT) com> wrote

Quote:
What I'm really impressed is why whether I Delete one, just one
record from any part of the file (begin, midle or end) it works.
I remember that this files isn't on the Filter range.



Hmmm, maybe the SUM is too large.
Have you tried adding a record to see what happens?

Or try to query all the data into a new table and then run the query on that
table. Do not do a table copy. The table might be damaged in some way.



Back to top
Lauro Lima
Guest





PostPosted: Sat Jun 28, 2003 1:42 pm    Post subject: Re: Sql don't wok with record over 9161???? Reply with quote


"mkm" <a@b.com> escreveu na mensagem
news:3ef8a60e$1 (AT) newsgroups (DOT) borland.com...
Quote:

With qryTotal Do Begin
Sql.Clear;
Sql.Add('Select Sum(C.TotCub) As TotaCubC From Estufas E');
Sql.Add('LEFT OUTER JOIN ClassiHE C ON ( C.sequen = E.gradea )');
Sql.Add('Where E.DatSai = ''01-JUN- 2003''');
Open;
End;

Hi,, Mkm...

If you read this,, I found the answer....
But I don't know why it work before. And stoped sudenly....

To fix it. I just change the order of the fields ==> C.Sequen = E.gradea
to
==> E.Gradea = C.Sequen

And start working again...

Thanks for you help...


Lauro




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.