So if I have a cfqueryparam, and the datatype in SQL is TEXT, which of the CFSQLTypes do I use? Or do I follow the below link about uniqueidentifiers? Or is it just better to change the datatype to varchar/longvarchar?
For a ColdFusion cfqueryparam which CFSQLType do you use for TEXT?
Asked Answered
I have used longvarchar in both cfqueryparam and procparams with good success
<cfqueryparam cfsqltype="cf_sql_longvarchar" value="#myLongText#">
text
is a deprecated data type used for storing very large strings (up to 2,147,483,647 bytes). As it says in the documentation, the correct cfsqltype for text
columns is cf_sql_longvarchar
.
uniqueidentifier
is a completely different data type. It is used to store small uuid values (36 characters only). So that type does not apply here.
© 2022 - 2024 — McMap. All rights reserved.