DataMgr Build 1 Documentation: Truncate Data

Truncate Data

You can use DataMgr to ensure that you never get a "String or binary data would be truncated" error. Normally, DataMgr will provide its own version of this error that tells you which field has too much data. If you want, however, you can have DataMgr truncate the incoming data to ensure that it will fit in the fields of the table.

Example:

<cfset data = Application.DataMgr.truncate("employees",data)>
<cfset Application.DataMgr.saveRecord("employees",data)>