How to see SQL statement sent to the DB server

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
micdearmas
Posts: 3
Joined: Mon 28 Aug 2006 19:13

How to see SQL statement sent to the DB server

Post by micdearmas » Mon 28 Aug 2006 20:08

Hi,

I have used the VCL version of this component and I could see with the Monitor the SQL statement being sent to the DB server. However, here in .NET, I don't find it.

For example, when I use parameters I would like to see the SQL statement with the values of the parameters already assigned and any type casting that the component might do.

In the VCL version I could see it, but I don't find it here.

???

Thanks.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 29 Aug 2006 07:46

What is meant by "the VCL version of this component"? We do not have such.
In .NET you should see parameters' values if Connection.Protocol property is set to "Ver20". If Connection.Protocol = "Ver30" you also may see them, but on the "Params" tab of DB Monitor.

micdearmas
Posts: 3
Joined: Mon 28 Aug 2006 19:13

Post by micdearmas » Tue 29 Aug 2006 15:18

I meant the component for Delphi VCL, but now I realized that was using ZeosLib in Delphi and not a component from you, sorry :)

Anyway, I was looking for something with that functionality. Something that allowed me to store in a log file the SQL Statements being sent to the server.

Is not that I want to see them interactively, but to be able get a log (if I wanted to activate it) with the SQL statements that the component sends once the parameters are asssigned, and also any other statment (i.e. COMMIT).

Thanks,

Michael.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 30 Aug 2006 06:08

For the logging purposes use TraceEvent of MySqlMonitor component.

Post Reply