I doubt that this would make a difference, but your connection string is
not valid.
You should use this connection string when using the SqlClient provider:
"Server=Davis\Davis;Database=Logging;Integrated Security=SSPI;"
--
Bryan Phillips
MCT, MCSD, MCDBA, MCSE
Blog:
http://bphillips76.spaces.live.com Web Site:
http://www.composablesystems.net [quoted text, click to view] "dmalhotr2001@yahoo.com" <dmalhotr2001@yahoo.com> wrote in message
news:1178925405.761588.169940@n59g2000hsh.googlegroups.com:
> Hi,
>
> I'm trying to log to the database however nothing is getting stored in
> the database. The flat file works fine however the database is not
> working properly.
>
> Please take a look at my web.config file and let me know.
>
> Thanks in advance
>
> :D
>
>
> #####################################################################################
>
> <configSections>
> <section name="loggingConfiguration"
> type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings,
> Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=null" />
> <section name="dataConfiguration"
> type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
> Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=null" />
> </configSections>
> <loggingConfiguration name="Logging Application Block"
> tracingEnabled="true"
> defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
> <listeners>
> <add databaseInstanceName="Connection String"
> writeLogStoredProcName="WriteLog"
> addCategoryStoredProcName="AddCategory" formatter="Text
> Formatter"
>
> listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData,
> Microsoft.Practices.EnterpriseLibrary.Logging.Database,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
> traceOutputOptions="None"
> type="Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener,
> Microsoft.Practices.EnterpriseLibrary.Logging.Database,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
> name="Database Trace Listener" />
> </listeners>
> <formatters>
> <add template="Timestamp: {timestamp}
Message:
> {message}
Category: {category}
Priority:
> {priority}
EventId: {eventid}
Severity: {severity}
Title:
> {title}
Machine: {machine}
Application Domain:
> {appDomain}
Process Id: {processId}
Process Name:
> {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name:
> {threadName}
Extended Properties: {dictionary({key} -
> {value}
)}"
>
> type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter,
> Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=null"
> name="Text Formatter" />
> </formatters>
> <categorySources>
> <add switchValue="All" name="General" />
> </categorySources>
> <specialSources>
> <allEvents switchValue="All" name="All Events" />
> <notProcessed switchValue="All" name="Unprocessed Category" />
> <errors switchValue="All" name="Logging Errors & Warnings">
> <listeners>
> <add name="Database Trace Listener" />
> </listeners>
> </errors>
> </specialSources>
> </loggingConfiguration>
> <dataConfiguration>
> <providerMappings>
> <add
> databaseType="Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase,
> Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=null"
> name="System.Data.SqlClient" />
> </providerMappings>
> </dataConfiguration>
> <connectionStrings>
> <add name="Connection String" connectionString="Driver={SQL
> Server};Server=Davis\Davis;Database=Logging;Trusted_Connection=Yes;"
> providerName="System.Data.SqlClient" />
> </connectionStrings>
>
> #####################################################################################