April 6, 2009 at 2:01 pm
I need to store HTML in 2 fields: logBody and logRawHTML
I originally set those fields as varchar but HTML would get truncated in weird spots. When I've changed it to NVARCHAR everything seemed to work fine Now I am dealing with an issue when text is slightly bigger than previously tested... :w00t:
What would be an ideal soolution to this without changing too many things around - separate tables etc.
Please help.
Many thanks!!!
CREATE TABLE [LogTransaction] (
[logid] [int] IDENTITY (1, 1) NOT NULL ,
[logTemplateid] [int] NULL ,
[logTitle] [varchar] (180) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logBody] [nvarchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logDescription] [varchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logWhy] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logWhen] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logAction] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logImpact] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logSendDate] [smalldatetime] NULL ,
[logReminder] [bit] NOT NULL ,
[logReminderDate] [smalldatetime] NULL ,
[logEmailTo] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logOwner] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logApprover] [nvarchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logStatus] [int] NOT NULL ,
[logRawHTML] [nvarchar] (3000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logReminderRawHTML] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logErrors] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[logSubmitDate] [smalldatetime] NULL CONSTRAINT [DF_LogTransaction_logSubmitDate] DEFAULT (getdate()),
[logApprovedDate] [smalldatetime] NULL ,
[logDepartmentID] [int] NULL ,
[logSendStatus] [int] NULL ,
[logReminderStatus] [int] NULL
) ON [PRIMARY]
GO
April 7, 2009 at 4:52 am
April 7, 2009 at 9:21 am
Can I have 2 fields of type of NVARCHAR with size 4000 plus others? 2 fields would be 8,000 plus other so it will exceed row size, right? am I getting this right?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply