Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Please Help! CF can't connect to DB

Community Beginner ,
Jun 02, 2006 Jun 02, 2006
Hello! I need help to figure out how to connect to my MSSQL DB. I just installed CFMX7 trial CD at my home computer. The installation was successful. I also sucessfully installed MSSQL server (local) 8.0.
But the 2 seem do not talk to each other.
When I set up the datasouce connection through CF administrator, I got this error message:

Connection verification failed for data source: MyApp_1
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect


For MSSQL server, I use windows authentication (UN and PW are the same as my windows US/PW)
If I use MS Access as the back end for my other application, it works well.

Note:
I tried to connect through Windows ODBC (not CF Administrator):
I Selected System DNS >> Highlight LocalServer - SQL Server >> clicked ADD >> on create datasource windows I selected SQL Server and clicked FINISH button >>> Create datasource to SQL server windows appear >>> I named my datasource, created description BUT on drop down server I have nothing listed...

Please help!!!!


TOPICS
Getting started
488
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 02, 2006 Jun 02, 2006
Developers SQLEXPRESS? That one installs with bogus Port settings. Use configuration manager to get to the final TCP/IP Addresses page and make sure all (but especially IPALL for public access) are Dynamic Ports=blank and TCP Port=1433. Also I don't believe NT Auth will work with CF, or if it does it would use whatever it's running as rather than what you supply in the datasource def. Try it with master and whatever you used for a password on the SQL install and it should follow the Server Auth route and get you in. Later on you can set up real server auths.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 13, 2006 Jun 13, 2006
Hi All, I've been trying for weeks to create connection between my MSSQL 2000 and CF SERVER through CF Administrator but I still get the error (see below). I'm not sure what to do.
I installed MSSQL Personal edition at my local and CFMX7 Trial CD and I just can't connect both, I'm not sure where is the mistake? and I don't even understand the error message!
I remember when I install the older version, 5 or MX 6, I did not find any difficulty.
Has anyone ever faced this problem? I'm getting tired with CFMX 7 now!

Connection verification failed for data source: MyApp_1
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 14, 2006 Jun 14, 2006
alecken,
Here are a few things to try. I know that this will work if you are using MSSQL Standard edition, and believe it should be the same for Personal. Someone correct me if I am wrong.
1. Open up a command prompt on the machine and type in netstat -an. Look to see if there is a port listening on 1433. If so. SQL server is broadcasting and should except connections. If not, then something is amiss with the SQL server.

2. Within SQL server, create a new user and set it to be the DBO of the DB that you are trying to connect to. Then in CF for the DSN properties, use that new user to connect to.


Reading the issue, it seems that the SQL server is not running correctly, since Windows cant connect to it either. You could always try re-installing it ( SQL ) and see. Perhaps you have a botched install.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 14, 2006 Jun 14, 2006
LATEST
You need to use SQL access to databases from the CF Admin, using NTAUTH doesn't work - I have never had it work in any edition of CF or SQL.

The SQLExpress 2005 tends to install default as "sharedmemory" with all other protocols turned off, meaning it isn't listening for TCP calls on 1433. You have to install the SQL Express Advanced version so you can use the added tools to change the connection protocols. In addition, if you didn't install it as the main instance, it will install a named instance, which makes it a little bit weirder for CF to connect to.

Once they are turned on, access the DB using SQL access authority, not NTAUTH, and use the computer name or IP address of the computer to connect.

It took me 2 days to finally figure out all the quirks for SQL Express 2005 with CF, but I did get it to work and it works really well once you do.


You will also need to make sure that something like your AV or personal firewall is not blocking port 1433 ( some McAfee versions will port block for protection)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources