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 error in TTCPServer.OnAccept event handler

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Hermann
Guest





PostPosted: Tue May 11, 2004 2:34 pm    Post subject: SQL error in TTCPServer.OnAccept event handler Reply with quote



Hello everyone,

My application (compiled by D7 ent, use SQL Server 2000)
do like this:
a TTCPServer for listening client connections, then
save received data to database.
but sometimes it encountered SQL executing error while
insert into table.
This happened in follow code piece:

procedure TService1.TcpServer1Accept(Sender: TObject;
ClientSocket: TCustomIpClient);
begin
// receive data from ClientSocket
try
with SQLQuery1 do
begin
// set parameters
ExecSQL;
Close;
end;
except
// save log and raise
end;
end;
end;

This error happened quite little probability, but must exist some
error in my code.

who can help me?
thanks

hermann





Back to top
Fabio Dell'Aria
Guest





PostPosted: Wed May 12, 2004 11:21 am    Post subject: Re: SQL error in TTCPServer.OnAccept event handler Reply with quote



"Hermann" <herman.wz (AT) mail (DOT) com> wrote

Quote:
Hello everyone,

My application (compiled by D7 ent, use SQL Server 2000)
do like this:
a TTCPServer for listening client connections, then
save received data to database.
but sometimes it encountered SQL executing error while
insert into table.
This happened in follow code piece:

procedure TService1.TcpServer1Accept(Sender: TObject;
ClientSocket: TCustomIpClient);
begin
// receive data from ClientSocket
try
with SQLQuery1 do
begin
// set parameters
ExecSQL;
Close;
end;
except
// save log and raise
end;
end;
end;

This error happened quite little probability, but must exist some
error in my code.

who can help me?
thanks

hermann

You can try EurekaLog ([url]www.eurekalog.com)[/url].

EurekaLog is an add-in tool that gives to your application (GUI,
Console, Web, etc.) the ability to catch every exception (even those
raised by memory leaks) and every infinite-loops/deadlock bugs,
generating a detailed log of call stack (with unit, class, method and
line #), showing and sending it back to you via email.
--
Best regards...

Fabio Dell'Aria.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) 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.