Is there a way to tell Enterprise Library to use prepared statements? If so, how?
Asked
Active
Viewed 639 times
0
-
1By prepared statements, do you mean parameterized sql statements? – Bryant Oct 10 '08 at 21:43
-
No, I do mean prepared statements. – NotMe Oct 12 '08 at 17:38
2 Answers
2
The short answer is to use DbCommand.Prepare();
The long answer is that it is completely irrelevant, and results in a noop, when calling stored procedures.
Also, it should only really be used when the code is about to make several calls (as in a loop) with the same query.

NotMe
- 87,343
- 27
- 171
- 245
0
You should be able to obtain the sqlConnection / Command being executed -> can't you set the relevant setting here before executing ??
Hope I've got the right end of the stick...

penderi
- 8,673
- 5
- 45
- 62