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.
Copy link to clipboard
Copied
What about leaving the cf_sql_clob in place, and changing the column datatype to varchar(max)?
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.
Copy link to clipboard
Copied
Ok, now I can write to it, but I'm getting gibberish.
U]£@¯¤ te°¶¤(¶¤P°¤5¥ F@FFÐFF@F`FàFFF FÜ£P#º CESSgü¤è±¤O ³¤ µ¤p²¤ T£ F@FFÐFF@F`FàFFF
Copy link to clipboard
Copied
Resolved. This turned out to be an SQL driver problem. cf_sql_clob works just fine with nvarchar(max) once that's fixed.