StormianRootSolver
StormianRootSolver

Reputation: 535

Enterprise Library: Log to SQL Server CE?

Is it possible to use the Logging block of the MS Enterprise Library with SQL Server Compact Edition?

Reason is that I want a hassle - free installation of the application, I can't require the users to install SQL Server Express Edition, sadly.

Also, I want to use the Enterprise Library, because it seems to be the highest quality product available. Log4Net is not an option, because I don't like it at all (and the last version I tested created compiler warnings like crazy...).

Upvotes: 2

Views: 547

Answers (2)

Grigori Melnik
Grigori Melnik

Reputation: 4107

For guidance on creating custom tracelisteners, see Extensibility Hands-on Labs. For inspiration, see Data Access Application Block extensions from the EntLibContrib.

Upvotes: 0

Paciv
Paciv

Reputation: 1487

The thing is that EntLib Logging application block included DatabaseTraceListener uses stored procedures but SQL Server CE doesn't support stored procedures. So you have to write your own CustomTraceListener to support it.

From this entry : Logging Block 3.1 against SQL CE 4.0, possible?, it is confirmed by EntLib support for version 3.1. And since the stored procedure system didn't change up to version 5 at least (I checked the CreateLoggingDB sql script in EntLib 5 sources), I think it is still the case.

Upvotes: 1

Related Questions