The benefits of <cfqueryparam> are worth the few drawbacks, IMO.  
But I do agree that it would be VERY nice if there were some way to dump the SQL to see exactly what's being passed to the database.

At least without cfqueryparam you could throw your SQL statement into a <cfoutput> block.  AFAIK, there's no real way to get a peek at the 'raw' SQL that's going to the DB whilst using <cfqueryparam> :(

charlie

  ----- Original Message -----
  From: Rick Root
  To: CF-Talk
  Sent: Friday, December 05, 2003 11:32 AM
  Subject: Re: Debugging CFQUERYPARAM

  Charlie Griefer wrote:

  > The thread Tom's referring to can be found at
  > http://www.mail-archive.com/[EMAIL PROTECTED]/msg157166.html
  >
  > Based on that, Sam Neff was good enough to put together the following
  > page, http://www.blinex.com/~sam/CF_SQL_TYPES.cfm , that displays
  > cfsqltypes with their corresponding datatypes in various databases.

  DAmn, and no mention of MySQL (except where someone said MySQL users
  would bitch about it).  And since I'm using CF 5.0 still, I'm not using
  JDBC drivers either.

  > As far as your error message, below...the obvious question to ask (and
  > sorry to do it, but you know it has to be asked) is...you have a few
  > empty values.  does your database accept null values/empty strings for
  > those columns?

  As someone else has mentioned... MySQL doesn't enforce NOT NULL...
  (which I didn't even know)... but the columns do all allow NULL values...

  So it looks like the only way of debuggin this is to go through the
  query... field by field... and see which one it is failing on.  Durn it.
    That's pretty lame.

  Coldfusion is supposed to protect us from having database-specific code
  in our applications, and yet it seems like CF_SQL_TYPE is very database
  specific.

    - Rick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to