Skip to main content
BreakawayPaul
Inspiring
July 25, 2014
Question

Problems with nvarchar(max)?

  • July 25, 2014
  • 1 reply
  • 462 views

During testing yesterday, I found that my web app wasn't updating records correctly.  Some columns update while others didn't.

Upon further inspection, I found that all the columns that weren't updating had one thing in common - they're all datatype nvarchar(max).

I'm not sure what the problem is, but the first thing that came to mind was my cfqueryparam tags.  I'm using cf_sql_clob as the cfsqltype (this is leftover from MS Access, as we needed that for memo fields).  I tried changing this to varchar and longvarchar with no luck.

The odd thing is that it works perfectly (using clob) on our test server, just not on our live server.  Both machines are running CF8, but one is running SQL Express and the other is running SQL Enterprise.

I'm sort of not sure where to go from here as far as debugging this. 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    July 25, 2014

    What about leaving the cf_sql_clob in place, and changing the column datatype to varchar(max)?

    BreakawayPaul
    Inspiring
    July 25, 2014

    I just tried changing the datatype but SQL studio wouldn't let me, but I think I can probably do it with an alter table statement.