OK, good point. We actually setup our table to use varchars and changed
the dbType to AnsiString, so I guess I should have suggested that change
instead. :)

 

-----Original Message-----
From: Borton, Anthony [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 30, 2004 5:27 PM
To: Log4NET User
Subject: RE: Documentation update


Hi Eric,

Thanks for the suggestion about using nvarchar and I agree that it makes
sense given the fact that we are sending unicode strings to the
ADONetAppender. The problem I have found with your suggestion is that it
results in a problem with the SQL rowsize limitation.

I believe SQL 2000 has a rowsize limit of 8060 bytes. This equates to
only 4030 unicode characters. Given your suggested change below, your
maximium rowsize is OVER 13000 bytes and well and truly exceeds the SQL
limit. I have changed the column types for both MESSAGE and EXCEPTION to
ntext which gets around the rowsize limitation at the cost of query
performance when you want to read the data back to analyse it.

Can anyone with a good SQL knowledge let me know any other
considerations I should look out for with nText or is there a better
way?

Thanks

Anthony

-----Original Message-----
From: Nicko Cadell [mailto:[EMAIL PROTECTED]

Sent: Tuesday, 30 November 2004 07:47
To: Log4NET User
Subject: RE: Documentation update


thanks!

Nicko


> -----Original Message-----
> From: Eric Crutchfield [mailto:[EMAIL PROTECTED]
> Sent: 29 November 2004 20:16
> To: [email protected]
> Subject: Documentation update
>

> In the documentation for v1.2, the MS SQL Server example for 
> ADONetAppender has a misleading table creation script. The

> table should create nvarchar columns instead of varchar

> columns because the DBType parameters in the configuration

> are set to "String". String is a unicode (i.e. nvarchar) format.

>

>

> The table creation script should read:
> CREATE TABLE [dbo].[Log] (
>       [Id] [int] IDENTITY (1, 1) NOT NULL,
>       [Date] [datetime] NOT NULL,
>       [Thread] [nvarchar] (255) NOT NULL,
>       [Level] [nvarchar] (50) NOT NULL,
>       [Logger] [nvarchar] (255) NOT NULL,
>       [Message] [nvarchar] (4000) NOT NULL,
>       [Exception] [nvarchar] (2000) NULL
> )
>

> This example can be found here:

> http://logging.apache.org/log4net/release/config-examples.html
> #HC-125907
> 45
>

> You could also change the related /appender/parameter/[EMAIL PROTECTED]
> attribute to 'AnsiString' instead of 'String.
>

> Hope this helps,
> Eric
>

>

> This e-mail and any files transmitted with it are confidential and are

> intended solely for the use of the

> individual or entity to whom they are addressed.  This

> communication may contain information that is protected from

> disclosure by applicable law.  If you are not the intended

> recipient, or the employee or agent responsible for

> delivering this communication to the intended recipient, be

> advised that you have received this e-mail in error and any

> use, dissemination, forwarding, printing or copying of this

> e-mail is strictly prohibited.  If you believe that you have

> received this e-mail in error, please immediately notify

> Edgewater Technology by telephone at (781) 246-3343 and

> delete the communication from all e-mail files.
>

>

>

>

>


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager of QR.

This message has been scanned for the presence of computer viruses. No
warranty is given that this message upon its receipt is virus free and
no liability is accepted by the sender in this respect.

This email is a message only; does not constitute advice and should not
be relied upon as such.
**********************************************************************

Reply via email to