Search code examples
c#enterprise-library

How to use prepared statements with Enterprise Library?


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


Solution

  • 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.