views:

219

answers:

1

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!

+1  A: 

CF_SQL_CHAR or CF_SQL_IDSTAMP

see: http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags%5Fp-q%5F18.html

Henry
CF_SQL_CHAR is also listed for uniqueidentifier without comment. Does anyone know if there is a difference and/or preference?
Dan Sorensen
either one is fine, I think
Henry