I recently moved my database from an older version of MS SQL Express to MS SQL Express 2008 R2. I have one field that stores a large amount of text and HTML markup that I later use to include in a web page via Coldfusion. This field is set to datatype varChar(max).
The data is written to the database with a simple UPDATE query as follows:
Note the CAST function was just added while trying to sort this out
UPDATE KeyPostings
SET
PostingDate = '#PostingDate#',
Posting = CAST('#Posting#' AS varChar(Max)),
Author = '#Author#',
PostingDescription = '#PostingDescription #',
MenuPost = '#MenuPost#',
GATAPost = '#GATAPost#',
GATAPosted = '#GATAPosted#',
AuthorUserID = '#AuthorUserID #'
WHERE PostingID = '#PostingID#'
I have verified that the entire data is not being stored by running a query in SQL Manager to retreive the Len() of the field "posting." Once maxed out at arond 69988 subsequent saving of additional data (added to the end of the existing data in our form field) does not increase the Len reported.
All help greatly appreciated!!