Skip to main content
Inspiring
November 30, 2012
Answered

Database connection

  • November 30, 2012
  • 1 reply
  • 912 views

I would like to connect my MS SQL database from ColdFusion server.

Can I use connection string to connect database or I need set up ODBC at ColdFusion level and use application paramter to connect database server?

Your help and informaiton is great appreciated,

Regards,

Iccsi,

    This topic has been closed for replies.
    Correct answer Carl Von Stetten

    @iccsi,

    If you are asking whether you can create an ad-hoc database connection using a connection string inside of a .cfm or .cfc file, I think the answer is probably no.  A datasource can be programmatically created using teh CF Administrator API, but that would require granting the developer the permissions to use the API.

    The datasource connection configuration is behind the CF Administrator and the Administrator API by design for security.

    -Carl V.

    1 reply

    BKBK
    Community Expert
    Community Expert
    November 30, 2012

    There is a facility in the ColdFusion Administrator to enable you to connect to your MS SQL database.

    iccsiAuthor
    Inspiring
    November 30, 2012

    Thanks for the message and help,

    Do you mean that developer can not use connection string to connect MS SQL server?

    Developer needs request ColdFusion Administrator to make the connection and in my application that I can use application parameter to connect MS SQL Server database.

    Thanks again for helping and information,

    Regards,

    Iccsi,

    Carl Von Stetten
    Carl Von StettenCorrect answer
    Legend
    November 30, 2012

    @iccsi,

    If you are asking whether you can create an ad-hoc database connection using a connection string inside of a .cfm or .cfc file, I think the answer is probably no.  A datasource can be programmatically created using teh CF Administrator API, but that would require granting the developer the permissions to use the API.

    The datasource connection configuration is behind the CF Administrator and the Administrator API by design for security.

    -Carl V.