Reputation: 101
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?
Upvotes: 5
Views: 4908
Reputation: 28873
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.
Upvotes: 4
Reputation: 3213
I have used longvarchar in both cfqueryparam and procparams with good success
<cfqueryparam cfsqltype="cf_sql_longvarchar" value="#myLongText#">
Upvotes: 7