• Home
  • About Jon Dowdle
  • Lifestream
KEEP IN TOUCH

Posts tagged coldfusion

StackOverflow.com : View Unanswered CF Questions

Feb06
2009
Written by Jon Dowdle

I'm a bit new to StackOverflow.com, so pardon me if there is a better way to view the unanswered CF questions (please share in the comments if you know a better way). Today after clicking back and forth between "Unanswered" and "Coldfusion" I thought I'd fiddle with the URL just a little. It turns out that by combining 'unanswered' and 'tags/coldfusion' in the URL you get to see all of the unanswered Coldfusion questions!

Here are a few of the tags that I'm interested in helping answer questions for:

  • http://stackoverflow.com/unanswered/tagged/coldfusion
  • http://stackoverflow.com/unanswered/tagged/javascript
  • http://stackoverflow.com/unanswered/tagged/jquery
Tagged stackoverflow

MySQL Concat() and Mixed Types

Feb05
2009
Written by Jon Dowdle

While in the process of upgrading our connector/J to version 5.1 we started seeing the following error:

ComplexByteArrayException: ByteArray objects cannot be converted to strings.

After doing a little homework we found that the root cause was in the way that CONCAT() processed numbers. CONCAT() was returning a binary string due to having both numbers and strings as arguments.

Our fix was to CAST() all numbers to CHAR, which results in a normal string being returned. Another option is to call toString() on all of your affected columns when referencing them in the query object.

For example the SQL fix is demonstrated below:

Select Concat('a string', 1)

would return a binary string where as

Select Concat('a string', Cast(1 as char))

would return a "normal" string.

Resources:

  1. http://bugs.mysql.com/bug.php?id=7739
  2. http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat
  3. http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date
  4. http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format
Posted in Code - Tagged ComplexByteArrayException, concat, MySql
« Older Entries Newer Entries »

Recent Posts

  • Code from TDD Demystified through Katas
  • Awesome Web Development Links Found This Week
  • Taggable Demo Video (now with more code)
  • Taggable Demo Video
  • New jQuery Plugin: Taggable

Categories

  • Code
    • MySQL
    • Programming
    • Web Design
  • coldfusion
  • Life
    • Events
  • Reviews
  • Uncategorized
  • Work

Tags

adobe barcamp barcamporlando coldfusion ComplexByteArrayException concat conferences decorator design pattern Events firebug Form fowa html IE ignite infection control iterator javascript job jQuery movies MySql orlando Photos pirate booty pirates plugins poll project python railo software development sql stackoverflow stax.net style taggable tags talk like a pirate tips & tricks tools twitter washington dc Web Design

RSS Syndication

  • All posts
  • All comments

EvoLve theme by Theme4Press  •  Powered by WordPress jDowdle.com