R
Rene
As we all know, ADO.Net allows you to use a command object to execute a
query. We all also know that the command object also exposes a parameter
collection that you can use if you are building a parameterized SQL
statement.
I am assuming that internally, ADO.Net takes the parameterized query and the
parameter collection to build the query statement that is sent to the
backend database engine (SQL server, Jet engine etc). So for example,
assuming that I have a parameterized query and that I add a parameter to the
command parameter collection as show below:
SELECT * FROM Customers WHERE CustomerName = @CustName
myCommand.Parameters.Add("@CustName", "Pupu Caca");
I am assuming that ADO.Net will take the information entered above and
produce an SQL statement that is sent to the database engine such as the one
below:
SELECT * FROM Customers WHERE CustomerName = 'Pupu Caca'
If this is true, is there a way to get this (already parsed) SQL statement?
Thanks.
query. We all also know that the command object also exposes a parameter
collection that you can use if you are building a parameterized SQL
statement.
I am assuming that internally, ADO.Net takes the parameterized query and the
parameter collection to build the query statement that is sent to the
backend database engine (SQL server, Jet engine etc). So for example,
assuming that I have a parameterized query and that I add a parameter to the
command parameter collection as show below:
SELECT * FROM Customers WHERE CustomerName = @CustName
myCommand.Parameters.Add("@CustName", "Pupu Caca");
I am assuming that ADO.Net will take the information entered above and
produce an SQL statement that is sent to the database engine such as the one
below:
SELECT * FROM Customers WHERE CustomerName = 'Pupu Caca'
If this is true, is there a way to get this (already parsed) SQL statement?
Thanks.