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

Create DataSouce using API

New Here ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

I want to create DataSource using ColdFusion Administrator API. All my credential are correct that's for sure. I have followed this tutorial and also Adobe Tutorial. I don't know what am doing wrong in here.

<cfset adminAPI = createObject( 'component', 'cfide.adminapi.administrator' ) />

<cfset adminAPI.login( 'CFAdminPass', 'admin' ) />

<cfscript>

  dsnAPI = createObject( 'component', 'cfide.adminapi.datasource' );

  dsn = {

  driver = 'mysql5',

  name = 'cfdb',

  host = 'localhost',

  port = '3306',

  database = 'cfdb',

  username = 'root',

  password = 'mysqlpass'

  };

  // Finally, we save the new datasource

  dsnAPI.setMySQL5( argumentCollection = dsn );

</cfscript>

Views

307

Translate

Translate

Report

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
Advocate ,
Mar 22, 2016 Mar 22, 2016

Copy link to clipboard

Copied

LATEST

What is happening when you do this? Are you getting an error, have you  checked the logs?

Votes

Translate

Translate

Report

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
Documentation