用于MS SQL的惟一标识符字段类型的最合适的Coldfusion cfsqltype是什么?

时间:2021-07-30 17:02:40

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

当从Coldfusion 8连接到MS SQL 2008数据源时,我应该使用什么Coldfusion cfsqltype来将SQL列设置为“惟一标识符”。

<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 个解决方案

#1


5  

CF_SQL_CHAR or CF_SQL_IDSTAMP

CF_SQL_CHAR或CF_SQL_IDSTAMP

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

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

#1


5  

CF_SQL_CHAR or CF_SQL_IDSTAMP

CF_SQL_CHAR或CF_SQL_IDSTAMP

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

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