 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Hermann Guest
|
Posted: Tue May 11, 2004 2:34 pm Post subject: SQL error in TTCPServer.OnAccept event handler |
|
|
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
|
Posted: Wed May 12, 2004 11:21 am Post subject: Re: SQL error in TTCPServer.OnAccept event handler |
|
|
"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 |
|
 |
|
|
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
|
|