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
[EMAIL PROTECTED]
(301) 306-8200 - Main
(301) 306-2829 - Direct

Ping Xie

CACI
4831 Walden Lane
Lanham, MD 20706
[EMAIL PROTECTED]
(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 [EMAIL PROTECTED] 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.

Reply via email to