0

Is there a way to tell Enterprise Library to use prepared statements? If so, how?

NotMe
  • 87,343
  • 27
  • 171
  • 245

2 Answers2

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