I am trying to query a MSSQL database to get a GUID
(9DE552B2-BABC-42CC-92A3-C641A39035E0) and pass it to another page. When I do
this I get the following error:
ByteArray objects cannot be converted to strings.
Here is the code that I am using:
<cfquery name="getticketid" datasource="crmadd">
select ticketid from ticket
where activityid = '#url.id#'
</cfquery>
<cfoutput> #gettickets.accountid# </cfoutput>
I think that I need to convert the GUID to something, but I am not sure what.
Any help would be great. Thanks!
Dan Bracuk - 30 Dec 2005 03:58 GMT
Can you use mssql to convert it to a string for you? Does it have any functions named string(), to_char(), or anything like that?
Ali Soylu - 30 Dec 2005 06:04 GMT
Yes, the sql server functions CAST and CONVERT can be used to convert it to
a CHAR
ALi