tags:

views:

30

answers:

1

Hello Fellow Programmers

For my website I've just implemented tinyMCE for my site (just a word processor). Everything works fine except when i try to store the string variable input into a sql server database. I want to store a string and not have the html tags make me exceed the 8000 length limit(the html tags take up most of that space). My question is, is there a solution so I can store my document with the html tags without shortening my document? Thanks

Some ideas I've had but not sure if they'll work

  • create an if statement that will determine the length If > 8000 than split the string apart and insert into seperate fields.
  • maybe their is a compression feature which I'm unaware of?

Paul

A: 

Can you store it as a BLOB or possibly even FILESTREAM. I know BLOB's have a size limit of 2 GB and are probably less than the ideal depending on the average size of the file you expect because of the hit to the log file. FILESTREAM's were added in SQL SERVER 2008 to handle large files by writing them directly to the filesystem by setting an attribute on the varbinary type.

bechbd
thanks bechbd, I did what jimplode said and it worked perfectly - i'm using sql server 2005 but I'll talk to my instructor about BLOB's and filestreams
PaulR