Ask a Question related to Coldfusion Database Access, Design and Development.
-
BIZ_CF #1
ByteArray Object Problem
Hi,
I have a binary field that contains SessionId. Iam retriving the sessionid
from the database and trying to pass that value in the <cflocation> tag. It is
giving errro as "ByteArray Object cannot be converted to Strings". Any solution
for this error?
Thanks in Advance
Regards
Rauf Khan
BIZ_CF Guest
-
SharedObject - ByteArray
Dear all, I have a problem with a SharedObject remote and flash media server (I'm using Flex obviously :-D). I have to store a custom class in a... -
Put String into a ByteArray
Hi: I have a String variable with the result of an SQL 2005 varbinary field. Can anybody tell me how to put this information into a ByteArray... -
ByteArray object to string
Hi, I am trying to connect to an AS400 database. The query runs fine and returns values . But when I try and display some of the values ,I get an... -
Issue with AS/400 DB2 query | ByteArray object error
We are running MX6.1 and just came across an error from data retrieved from our AS/400 (iSeries). We are receiving the 'ByteArray objects cannot be... -
Custom Control Problem :: Object reference not set to an instance of an object
Hi All! I have the following Custom Control file... '########### WebUserControl1.ascx ############# <%@ Control Language="vb"... -
david_h #2
Re: ByteArray Object Problem
you'll need to encode the data before you can pass it on a url.
Why may I ask are you using Binary data for a sesison ID?
david_h Guest
-
BIZ_CF #3
Re: ByteArray Object Problem
Our product is in Coldfusion 5, right now iam upgrading it to Coldfusion
MX7. Here we r storing the generated sessionid in the database and we are
verifying this as we proceed further by retriving the value from the database.
Also we are passing the si value in the URL by using <CFLOCATION> tag. This si
value is in binary form.
For coldfusion 5 as we pass the binary value in <CFLOCATION> tag, it was
not a problem. But in Coldfusion MX it is giving problem as
"================================================= ==
Error Occurred While Processing Request
ByteArray objects cannot be converted to strings.
Please try the following:
Enable Robust Exception Information to provide greater detail about the source
of errors. In the Administrator, click Debugging & Logging > Debugging
Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct
syntax.
Search the Knowledge Base to find a solution to your problem.
================================================== ========================"
I have tried by using the following encodes,"BinaryEncode,BinaryDecode,
BinaryEncode, CharsetDecode" again it is giving the same problem.
Any solution?
BIZ_CF Guest
-
BIZ_CF #4
Re: ByteArray Object Problem
Hi,
Got the solution after a great R&D.
If ur getting an error "ByteArray Object cannot be converted to String"
Follow this procedure. Here #id# is a ByteArray Object
<cfset aAbcArray = ArrayNew(1)>
<cfset aAbcArray[1] = #id#>
<cfset ArrayAppend(aAbcArray, "")>
<cfset one = aAbcArray>
<cfset one = #BinaryEncode(#id#,'Hex')#>
<cfoutput>#one<cfoutput>
Remember ByteArray Object is a complex data type and cannot be
converted to simple data type. If u find this problem then use the array value
directly instead of #one# value. Like this 'aAbcArray.value'
Rauf
BIZ_CF Guest



Reply With Quote

