Skip to main content
Participant
September 30, 2008
Question

ODBC Error, think it's bc of Application.cfm

  • September 30, 2008
  • 1 reply
  • 309 views
Ok I'm working on a small e-commerce project and it's been about a year and a half since I've done programming with CF, so I'm doing a lot of re-learning, basically everything and only remember a very small bit, so basically I'm noob again.

OK I built my project, I'm using MySQL as my database container. Everything runs perfectly fine on my local machine server but when I go to upload it to my hosting provider. I get the following error when I try to access the database on the hosting provider.

"
Error Diagnostic Information

ODBC Error Code = S1000 (General error)

[MySQL][ODBC 3.51 Driver]Access denied for user 'ODBC'@'my IP address' (using password: NO)

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (1:1) to (1:54).
"

OK, my guess right now is that it has something to do with the user and password authentication, and if that's the case, but to be honest I have no idea whats going on, cause this problem doesnt occur when I use PostgreSQL. I hope someone on here has been through this and knows what's up.

Here's the code in my Application.cfm file
<cfapplication name="joecool-ecom" sessionmanagement="yes" />
<cfset Request.DSN = "joecool-ecom" />
<cfset REQUEST.BasePath = GetDirectoryFromPath(GetCurrentTemplatePath())>

I'm completely lost and have been trying to figure this out for a solid 7+ hours. I'm hoping that it's just something really really lame and stupid that I'm doing wrong on my side and that it can be fixed very easily, but part of me questions if my hosting provider just plain sucks and that I may end up having to switch providers or something.
This topic has been closed for replies.

1 reply

Participant
October 1, 2008
well i found a solution and yes it was a b***...

It turns out it had something to do with ODBC on my hosting provider and MySQL. I ran a test on PostgreSQL and it worked fine, so I just redid my entire database into PostgreSQL and then changed all my boolean crap in my code from 1 to TRUE and 0 to FALSE. It sucked, but at least it works now.

If anyone has any experience with using ODBC with ColdFusion for MySQL, if you have any ideas of why this error would occur, please let me know. It has to do with it trying to login anonymously and not using a PW, but I have no idea how to fix that on a hosting provider. Talked to them and its just a bunch of foreigners that don't know anything about computers so.... whatever.

Also if anyone knows any good hosting providers that keep their ColdFusion current, please let me know. I'm getting away from mine once my subscription runs out in a few more months. They're still using ColdFusion 5, which sucks