Skip to main content
Inspiring
December 18, 2020
Question

Can not sucessfully connect to a datsource on desktop (local instance) SQL Server ?

  • December 18, 2020
  • 1 reply
  • 815 views

ColdFusion 2016

SQL Server (SQLEXPRESS01)

See below- any help greatluy appreciated. A thorny issue.

 

    This topic has been closed for replies.

    1 reply

    Community Expert
    December 18, 2020

    There are lots of potential problems you can have connecting to MS SQL Server. The problem you appear to be having is a network problem, rather than an authentication problem or an ODBC problem (you shouldn't even need an ODBC driver configured here). Take a look at your SQL Server Configuration Manager and make sure that you have TCP/IP enabled. I don't remember if there are any specific issues with using named instances, but you also need to make sure your instance has a specific port and make sure CF uses that. Ideally, you should be able to plug in an IP address for the database server and a port and it should work.

     

    I see that you're using Windows authentication, and CF doesn't support that without some additional fiddling around, so you'll have to solve that afterwards. It's easier to configure mixed mode authentication in SQL Server instead (although not as secure).

     

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    BKBK
    Community Expert
    Community Expert
    December 19, 2020

    I agree with Dave: you don't need an ODBC connection. Though I can understand you trying it when other options fail.

     

    Suggestion: in the Administrator, click on the "Edit" button next to the datasource "LaPoliceDesLauriers2021SQL" edit the settings as follows

     

    CF Data Source Name: LaPoliceDesLauriers2021SQL
    Database: LaPoliceDesLauriers2021SQL
    Server: 127.0.0.1 (enter the IP address of the database server)
    Port: 1434 (enter the port number of the database server)
    User name: database-username
    Password: database-password 

     

     

    Inspiring
    December 19, 2020

    I want to thank Dave & BKBK for your advice. I still have not been able to establish the SQL DB as a CFDatasource.

    Here are a few more images- CFAdmin now throwing a different error. Thanks again!