nvarchar(max) issue in v2.5

19 views
Skip to first unread message

Stephen Miller

unread,
Jun 24, 2013, 5:01:21 PM6/24/13
to dat...@googlegroups.com
Steve

Thanks for all your hard work on dataMgr. It a terrific component and I have made great use of it as well as having learned a great deal from you because of it.

I have been testing  version 2.5 (Build 172) and came across an issue when updating a table that has a column with a nvarchar(max) data type. The update action threw and error : The data for 'contentXML' must be no more than 255 characters in length.

While tracing the problem I noticed that the getCFDataType() had a switch case statement for varchar that tested for a column length of -1 but that the switch case statement for nvarchar did not.
To fix the problem I commented out the existing <cfcase value="nvarchar"><cfset result = "CF_SQL_VARCHAR"></cfcase> statement and added:

<cfcase value="nvarchar">
    <cfif Arguments.Length EQ "-1">
        <cfset result = "CF_SQL_LONGVARCHAR">
    <cfelse>
        <cfset result = "CF_SQL_VARCHAR">
    </cfif>
</cfcase>

Let me know if this is an appropriate fix.

notes: DataMgr_MSSQL.cfc; getCFDataType(); line 397

Regards
Stephen Miller

Steve Bryant

unread,
Jun 24, 2013, 5:45:38 PM6/24/13
to dat...@googlegroups.com
Stephen,

That looks right to me. Sorry I missed that. I will test out your fix and try to get it into the official DataMgr release shortly.

Thanks,

Steve



Stephen Miller

--
You received this message because you are subscribed to the Google Groups "DataMgr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datamgr+u...@googlegroups.com.
To post to this group, send email to dat...@googlegroups.com.
Visit this group at http://groups.google.com/group/datamgr.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages