Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: DbType for CLOB column using AdoNetAppender
Prev Next
You are not authorized to post a reply.

Author Messages
Ping Xie

10/24/2005 8:31 PM  
Hi,
 
I have sent the following email but used a wrong subject (by replying). I'm resending it.
 
Thanks.
----------------------------------------------------
Hi,
I'm using AdoNetAppender to log to an Oracle 10g database. There is a CLOB column used to store diagnosis message with stack trace if there is any. The following config is used for this column.
<param name="Parameter">
      <param name="ParameterName" value=":message" />
      <param name="DbType" value="String" />
      <param name="Layout" type="log4net.Layout.PatternLayout">
        <param name="ConversionPattern" value="%m" />
      </param>
</param>

When the size of message is greater than 2000 characters, the following exception is thrown (It works fine if the size is less than or equel to 2000).
log4net:ERROR [AdoNetAppender] Exception while writing to database
System.Data.OracleClient.OracleException: ORA-01461: can bind a LONG value only for insert into a LONG column


   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean isReader, Boolean needRowid, OciHandle& rowidDescriptor, ArrayList& refCursorParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.Execute(OciHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciHandle& rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciHandle& rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
   at log4net.Appender.AdoNetAppender.SendBuffer(IDbTransaction dbTran, LoggingEvent[] events) in c:\Work\cvs_root\apache\r1.2.9\logging-log4net\build\package\log4net-1.2.9-beta\src\Appender\AdoNetAppender.cs:line 550
   at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] events) in c:\Work\cvs_root\apache\r1.2.9\logging-log4net\build\package\log4net-1.2.9-beta\src\Appender\AdoNetAppender.cs:line 460
I wonder if DbType "String" is correct for CLOB column. What should be used if it is not?
Thanks you in advance for your help.
Ping Xie

CACI
4831 Walden Lane
Lanham, MD 20706
pxie@caci.com
(301) 306-8200 - Main
(301) 306-2829 - Direct

Ping Xie

CACI
4831 Walden Lane
Lanham, MD 20706
pxie@caci.com
(301) 306-8200 - Main
(301) 306-2829 - Direct
This electronic message contains information from CACI International Inc or subsidiary companies, which may be company sensitive, proprietary, privileged or otherwise protected from disclosure. The information is intended to be used solely by the recipient(s) named above. If you are not an intended recipient, be aware that any review, disclosure, copying, distribution or use of this transmission or its contents is prohibited. If you have received this transmission in error, please notify us immediately at postmaster@caci.com. With the exception of messages sent by authorized CACI contracts or purchasing personnel, nothing in this message may be interpreted as a digital or electronic signature that can be used to: (a) authenticate either the submission or the acceptance of a proposal or offer to contract, or (b) modify an existing contract.
You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > DbType for CLOB column using AdoNetAppender



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement