Skip to main content
August 7, 2012
Question

ColdFusion ignoring Connection String set in CFAdmin?

  • August 7, 2012
  • 1 reply
  • 4927 views

I'm trying to setup a 3rd party JDBC driver as a datasource, but it appears to not matter what I put in the Connection String field in CFAdmin, it doesn't seem to use it at all.

User=user@account.com;Password=!password;

Errors out with Login failed: You must provide a user and password to login.

I tried putting random text into the Connection String field expecting it to error out, but nothing happened either.

I was wondering if I was entering the data wrong (I also tried the entire connection string with the jdbc:, but that did not work either) or if there was some way to verify the entire connection string that ColdFusion was trying to use.

I'm not trying anything special inside of my cfquery tag: <cfquery name="output" datasource="mySource"> so that should not be the issue. I can get around the user/password issue by hard-coding these values in the cfquery tag, but there is a 3rd key that I need to provide as a connection value as well.

The issue shouldn't be with my connection string, because the following worked with pure Java:

conn = DriverManager.getConnection("jdbc:mydriver:User=user;Password=password;AccessToken=accessToken;");

.

An interesting addition...ColdFusion appears to not care at ALL what is at the end of my URL as long as the beginning is correct...

jdbc:mydriverrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr:

gives the username/password error. Whereas:

jdbc:mydriveer:

gives me an "unable to find driver" error.

This topic has been closed for replies.

1 reply

Inspiring
August 8, 2012

Hi,

On your CFAdmin page, click the database and check for this.

JDBC  URL : jdbc:oracle:thin:@#Ip address of the database#:#port#:#username#

There is a colon in between the database and the port and port and the username.

Also, your driver class should be oracle.jdbc.OracleDriver

I m assuming you are using Oracle.

August 8, 2012

As I said, I'm using a 3rd party jdbc driver, not Oracle.

And the connection string that I used in Java (shown above) works just fine. There is no database to connect to persay. It is also a local data source.

August 13, 2012

I also experience this issue in CF9, so it isn't just an issue with CF10