Re: How to store HTML code in SQL server table
From: Jeffrey Palermo [MCP] (http://dotnetjunkies.com/weblog/jpalermo)
Date: 11/30/04
- Next message: Sleepy: "DBCC SHOWCONTIG - what's relevant?"
- Previous message: Aaron [SQL Server MVP]: "Re: Indexes confusion"
- In reply to: Wayne Snyder: "Re: How to store HTML code in SQL server table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 18:39:17 -0600
Wayne,
Maybe it's just a typo, but varchar cannot be properly used with unicode
and has a maximum length of 8000 characters. nvarchar has a limit of 4000
characters and should be used for all applications for maintenance purposes
(since most applications will have to support unicode in the future).
-- Best regards, Jeffrey Palermo Blog: http://dotnetjunkies.com/weblog/jpalermo "Wayne Snyder" <wayne.nospam.snyder@mariner-usa.com> wrote in message news:eL$4fPh1EHA.4004@tk2msftngp13.phx.gbl... > As the other poster states, it is not SQL that is doing the encoding, it is > something else... > > Also, if the html pages will be less than 4000 unicode characters, you may > prefer to strore the data in a varchar column. > > -- > Wayne Snyder, MCDBA, SQL Server MVP > Mariner, Charlotte, NC > www.mariner-usa.com > (Please respond only to the newsgroups.) > > I support the Professional Association of SQL Server (PASS) and it's > community of SQL Server professionals. > www.sqlpass.org > > "Peter Afonin" <pva@speakeasy.net> wrote in message > news:eyXuQOa1EHA.3820@TK2MSFTNGP11.phx.gbl... > > Hello, > > > > I'm creating something like a web site builder in ASP.Net, and I need to > > store an HTML code in the SQL server table. If my customer just enters an > > HTML code, it is stored in the SQL server table like this: <table > > cellSpacing="0" cellPadding="0" width="760" > > border="0">, instead of <table cellSpacing="0" > cellPadding="0" > > width="760" border="0"> > > > > This significantly increases the size of the stored code. > > > > Are there any conversion functions or something like this to avoid it? > Where > > this conversion should be done - in ASP.Net or SQL server? How do I > convert > > it back to create an HTML page? > > > > Please note that I must use the Unicode data type - ntext, nchar etc, > since > > I'm using some Cyrillic characters. > > > > I would appreciate your advice very much. > > > > Thank you, > > > > -- > > Peter Afonin > > > > > >
- Next message: Sleepy: "DBCC SHOWCONTIG - what's relevant?"
- Previous message: Aaron [SQL Server MVP]: "Re: Indexes confusion"
- In reply to: Wayne Snyder: "Re: How to store HTML code in SQL server table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading