• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

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?
0
rcopeman
Asked:
rcopeman
1 Solution
 
Renante EnteraSenior PHP DeveloperCommented:
Hello rcopeman!

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 :-)
0
 
rcopemanAuthor Commented:
I've tried that and it is fine.
0
 
MauseCommented:
Do you get an error?
can you show us the code
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
rcopemanAuthor Commented:
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!
0
 
MauseCommented:
Do you get an error??
Or is the code working but nothing is displayed when outputting the TEXT field?
0
 
rcopemanAuthor Commented:
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

0
 
MauseCommented:
Can you post your query / code
0
 
rcopemanAuthor Commented:
     
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
0
 
MauseCommented:
Did you try the same query in mysql and did it return the record you want ?
0
 
rcopemanAuthor Commented:
Yes and it works fine!
0
 
rcopemanAuthor Commented:
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.


0
 
moduloCommented:
PAQed with points refunded (125)

modulo
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now