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

蓝咒 提交于 2019-12-20 02:10:09

问题


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:


CF_SQL_CHAR or CF_SQL_IDSTAMP

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



来源:https://stackoverflow.com/questions/1949884/what-is-the-most-appropriate-coldfusion-cfsqltype-to-use-for-ms-sqls-uniqueiden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!