For a ColdFusion cfqueryparam which CFSQLType do you use for TEXT?
Asked Answered
T

2

5

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?

Tallia answered 26/6, 2013 at 21:54 Comment(0)
K
7

I have used longvarchar in both cfqueryparam and procparams with good success

<cfqueryparam cfsqltype="cf_sql_longvarchar" value="#myLongText#">
Kissee answered 26/6, 2013 at 22:58 Comment(0)
C
4

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.

Courier answered 27/6, 2013 at 0:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.