• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problems with nvarchar(max)?

Contributor ,
Jul 25, 2014 Jul 25, 2014

Copy link to clipboard

Copied

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. 

Views

392

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2014 Jul 25, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 25, 2014 Jul 25, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 25, 2014 Jul 25, 2014

Copy link to clipboard

Copied

Ok, now I can write to it, but I'm getting gibberish.

U]£@¯¤€  te°¶¤(¶¤P°¤˜5¥     F@F€FАF‘F@‘F`‘Fà‘F“F“F ’FÜ£P#€º CESSgü¤è±¤€O €³¤ µ¤p²¤ T£     F@F€FАF‘F@‘F`‘Fà‘F“F“F

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 25, 2014 Jul 25, 2014

Copy link to clipboard

Copied

LATEST

Resolved.  This turned out to be an SQL driver problem.  cf_sql_clob works just fine with nvarchar(max) once that's fixed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation