rcopeman
asked on
Problems with selecting all fields with a star in coldfusion MX
I'm using SELECT * statement in query from a mySQL database in Coldfusion MX. It all worked untill upgrading to MX. Also I'm having a problem with text fields in the MySQL database. I tried changing to blob but still the same problems. Any ideas as to what it could be?
ASKER
I've tried that and it is fine.
Do you get an error?
can you show us the code
can you show us the code
ASKER
It seems that the problem is caused by the text fields in the database. If I change the firld type to varchar(255) it all works fine. However I need a much longer text field and as soon as I use text or blob if all falls over!
Do you get an error??
Or is the code working but nothing is displayed when outputting the TEXT field?
Or is the code working but nothing is displayed when outputting the TEXT field?
ASKER
No. No error message but if I look at the debugging information the CFQUERY returns no records when the text fields are included. As I mentioned before if I change the text fields to varchar then it returns the correct record.
Thanks for your help. It doesnt seem to make much sence since it all worked in CF5
Thanks for your help. It doesnt seem to make much sence since it all worked in CF5
Can you post your query / code
ASKER
Nothing complex:
<CFQUERY NAME="getDetails" DATASOURCE="enpod" MAXROWS="1" DBTYPE="ODBC">
select *
from enp_advert
where advert_ref = #URL.id#
</CFQUERY>
enpod is a mySQL database
Thanks
Did you try the same query in mysql and did it return the record you want ?
ASKER
Yes and it works fine!
ASKER
OK I have found the problem. It is to do with the native drivers. I reloaded the myodbc after upgrading to MX and everything is now working fine.
Thanks for your comments.
Thanks for your comments.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try to double-check the Datasource that you created on the CF Administrator. Be sure that the account has a permission on your MySQL Database. Verify the connection.
Goodluck!
eNTRANCE2002 :-)