View contents of a selectcommand including the values of the param

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm currently creating an application with a lot of select statements in it.
For security reasons I always use parameters.

The problem with parameters is that when you want to review your select
statement with selectCommand.CommandText, you see the name of the parameters
in case of there values.

Is there a way to get the selectstring with the values of the parameters ?
I know that I can select the parameters manually but it would be handy if
there was a function who did this automatically. This way it is easier to
test the query in Query Analyzer.

Thanks in advance,

Geert Verhoeven
 
Turn on the Profiler and start a trace.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
William,

Thanks for the info allready.
I still have a small question concerning the topic. In the question I
mentioned Query Analyzer for which everything works well. Unfortunately I
need to work on Oracle database and the client is using TOAD as utility. I
allready found a way to view the current sessions (which by the way isn't
practical) but in the select statements it shows me my parameters with the
:p_parametername syntax.

So is there a way to retrieve the full select statement from the
oraclecommand with the parameters filled in ? Or do I need to create a class
for this myself.

A second reason to have this is to be able to put the select statements in a
log file to review what happend.

Thanks in advance,

Geert Verhoeven
 
Oracle stuff? BHOM* Sorry.



(*) Beats the He11 Out of Me or dunno.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top