Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / December 2005



Tip: Looking for answers? Try searching our database.

SQL GUID as Coldfusion Variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sequenzia - 29 Dec 2005 22:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.