I am developing Content Management System for my website. I am facing issues how to save large html content in database. Stored Procedures limits its parameters to 8000 characters, and not accept any content more than this length. so how could i store my content in database.
Or there is any other better way to do the job, where to save the html content. Also how the images (inside html) be stored, or its links, what would be the implementation scenario?
Lots' of CMS systems are running, how they have implemented this functionality.
Please suggest better ideas, how to deal with this requirement.
Tools I am using : C#.net SQL Server 2005 Asp.net 2.0
If you're using SQL Sever 2005, why not use the VARCHAR(MAX) datatype?
VARCHAR(MAX) and NVARCHAR(MAX) can hold the same amount of data that the old TEXT and NTEXT could hold (2 GB) but they are much more flexible than TEXT/NTEXT. They are stored in the same type of data pages used for other data types.
As far as what to do with images, my recommendation would be to store them in the filesystem and simply use normal img tags that point to them.
This is fairly typical for CMSes, to store article content in a table which would later be embedded in a template somewhere. Although document databases like MongoDB are increasing in popularity for this type of application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With