Skip to main content
Known Participant
September 14, 2010
Question

Help! New CF/SQL installation - can't get CF to talk to datasource!

  • September 14, 2010
  • 2 replies
  • 1489 views

*Any* help appreciated.

New CF Developer Ed. installation (CF 9,0,0,251028).  New SQL Express installation (SQL Express 2005).  Both are running under Local System Acct.  SQL is working (created new db OK).  Connecting to SQL via sa acct.  Running on WinXP Pro.  CF and SQL services are running OK.

I create the datasource in the admin console and I get the following error:

Connection verification failed for data source: Test1
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Connection refused: connect
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Connection refused: connect

I created the datasource with:

Server: localhost port 1433, and also tried 127.0.0.1 port 1433

User name: sa

Password: sa password (yes, I typed it correctly)

All other settings left as default.

Please help!  Much thanks in advance!

    This topic has been closed for replies.

    2 replies

    lerxst3Author
    Known Participant
    September 14, 2010

    Thanks for the help!  As it turns out, for SQL Express, you need to explicitly turn on TCP/IP, change the

    default port to 1433 and turn on Named Pipes (I actually don't know for sure if Named Pipes needs to be on, but I turned it on and changed the port when just turning on TCP/IP didn't work).

    September 14, 2010

    NP, glad you got it going.  Named pipes shouldn't need to be on, so I would have another go at turning it off.

    I have seen the problem before, when connecting over localhost, 127.0.0.1 or the machine name, shared memory (the only one thats enabled by default) should be enough to connect, but in some cases it doesn't work.  I even had a server once just stop working one night on shared memory, and only enabling TCP/IP would get it going again.

    I never found the exact reason, so if any one else knows why, i'd be interested.

    September 14, 2010

    "All other settings left as default." Have you created a database?  What is the name of the database?

    In the SQL Server Configuration Manager, try enabling TCP/IP as well.  See if that makes a difference.