Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: MySQL Aliases are not respected.
Created on: 02/25/08 01:28 AM Replies: 6
KernelPanic


Joined: 02/25/08
Posts: 4
MySQL Aliases are not respected.
02/25/08 1:28 AM

Running BlueDragon 6.2JX with MySql5.

An example query

<cfquery name="test">Select title as "BookName",sales from books.</cfquery>

The following will fail with the error that the field does not exist:
<cfoutput>#test.BookName#</cfoutput>

However, the following will work:

<cfoutput>#test.title#</cfoutput>


It did work under mysql 3.23, any solutions?
Link | Top | Bottom
KernelPanic


Joined: 02/25/08
Posts: 4
RE: MySQL Aliases are not respected.
02/25/08 1:36 AM

Further to this:
Ive read http://www.newatlanta.com/c/auth/support/bluedragon/bugtracking/detail?page=2&bugId=2568

And it references:
http://bugs.mysql.com/bug.php?id=22757

but we are using version 5.1.5 of the connector.
Link | Top | Bottom
hyde11


Joined: 10/04/07
Posts: 8
RE: MySQL Aliases are not respected.
02/25/08 11:02 AM

I can't image how it worked. Your alias should not be in quotes; you also need to remove the period at the end of the query string - so rewrite as:

<cfquery name="test">Select title as BookName, sales from books</cfquery>


This should work.
Link | Top | Bottom
lori


Joined: 10/10/07
Posts: 140
RE: MySQL Aliases are not respected.
02/25/08 11:57 AM

I tested the mysql 5.1.5 driver and found, as you did, that aliases were not working.

Try opening BlueDragon Admin UI and configure your mysql datasource connection string like this:
useOldAliasMetadataBehavior=true

Let me know if this resolves the problem. Evidently, this is a known issue with mysql connector.
http://bugs.mysql.com/bug.php?id=33561
Lori Pacheco, New Atlanta Technical Support
Link | Top | Bottom
hyde11


Joined: 10/04/07
Posts: 8
RE: MySQL Aliases are not respected.
02/25/08 2:10 PM

Or you could use the old version of the driver. I just checked and I am using 5.05 and it works fine.
Link | Top | Bottom
KernelPanic


Joined: 02/25/08
Posts: 4
RE: MySQL Aliases are not respected.
02/25/08 5:28 PM

Lori, thats the answer I have found and it works well.

Hyde11, sorry, I just pieced the example strings in my original posts to show the point, sorry for the errors.

The old driver is always an option, however, in this case, im just going to run with useOldAliasMetadataBehavior=true in the connection string.


Thanks all for the help.
Link | Top | Bottom



Joined:
Posts: 0
Antivirus keys, bases, soft
01/22/16 6:52 AM

<u>http://bit.ly/antivir_us</u>; - Kluchi, bazy, soft k antivirusam: Kaspersky, Eset, Dr.Web, Avast, Avira (Keys, bases, soft for antiviruses: Kaspersky, Eset, Dr.Web, Avast, Avira)
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine