What is the most appropriate Coldfusion cfsqltype to use for MS SQL's uniqueidentifier field type?
Asked Answered
C

1

3

When connecting from Coldfusion 8 to a MS SQL 2008 datasource, what Coldfusion cfsqltype should I use for a SQL column set to 'uniqueidentifier'.

<cfquery name="user" datasource="#ds#">
    SELECT id, username
    FROM users
    WHERE id = <cfqueryparam cfsqltype="WHAT_CF_SQL_TYPE_HERE?" value="#arguments.id#">
</cfquery>

Thanks!

Christoffer answered 22/12, 2009 at 23:28 Comment(0)
B
5

CF_SQL_CHAR or CF_SQL_IDSTAMP

see: http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_18.html

Barracuda answered 22/12, 2009 at 23:34 Comment(1)
CF_SQL_CHAR is also listed for uniqueidentifier without comment. Does anyone know if there is a difference and/or preference?Christoffer

© 2022 - 2024 — McMap. All rights reserved.