> I am testing a site I switch from ACCESS to MySql and I ma
> getting the following error.
> ByteArray objects cannot be converted to strings.

For some reason the result of some MySQL queries (especially those using
MySQL date functions like DATE_ADD() and DATE_FORMAT()) is treated as a
binary field by CF: try dumping out the query and you'll see a nice
yellow box filled with a long hex string embedded in your query results
where you'd expect a date to be.

It's easy enough to combat: just run the date field through a tostring()
call to convert it back to the required string representation:

<cfset variables.myDate = toString(variables.qQuery.datefield)>

Tim.

--
-------------------------------------------------------
Badpen Tech - CF and web-tech: http://tech.badpen.com/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to