tracker issue : CF-4198277

select a category, or use search below
(searches all categories and all time range)
Title:

When creating new datasource for MSSQL via adminapi.datasource.setMSSQL then the 'drop' attribute is ignored

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Jens lundgaard / Jens lundgaard ()

Created: 01/20/2017

Components: Administrator, Admin API

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.03.301771 /

Priority/Frequency: Normal / All users will encounter

Locale/System: ALL / Win 2008 Server R2 64 bit

Vote Count: 6

Problem Description:
There seems to be a bug when setting up MSSQL DSNs where the setMSSQL function completely ignores the "drop" parameter and therefore it isn't possible to prgrammatically set up a DSN where SQL DROPs are allowed (as the default is disallowed). 

This is happening in CF2016 (we are trying to upgrade our app from CF9 but this is currently blocking us from purchasing/deploying CF2016!!)
Following your documentation here: http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fcf.html

Steps to Reproduce:
Note: Summarised code

stuParams = {};
stuParams.driver = "MSSQLServer";
stuParams.name = "someDSNnameHere";
stuParams.host = "aValidSQLHost";
stuParams.port = 1433;
stuParams.database = "someValidDBName";
stuParams.username = "someValidDBLogin";
stuParams.password = "someValidDBpassword";
stuParams.encryptpassword = true;
stuParams.grant = true;
stuParams.revoke = true;
stuParams.sendStringParametersAsUnicode = true;
stuParams.selectmethod = "direct";
stuParams.disable_clob = false;
stuParams.storedProc = true;
stuParams.create  = true;
stuParam.drop = true; 

objDatasource = createObject("component","cfide.adminapi.datasource");
objDatasource.setMSSQL(argumentCollection=stuParams);

Actual Result:
SQL DROPs do not get enabled (although the other ones do, e.g. create, storedProc, etc)
PS: Have also tried "drop = 1", "drop = yes" and "disable_drop = false" to no avail.

Expected Result:
SQL DROPs should be allowed on the new DSN

Any Workarounds:
Obviously one could go into the CFIDE admin and manually tick it but we have hundreds of databases and need to automate it.

Attachments:

Comments:

This is Vital for my build script!!
Vote by James S.
1310 | January 20, 2017 11:36:03 AM GMT
Adobe, are anybody there???
Comment by Jens l.
1306 | February 13, 2017 09:51:14 PM GMT
???????????????????????????????????????????????????????????????????????????????????????????????????
Comment by Jens l.
1307 | February 22, 2017 05:24:07 PM GMT
Looks like you have a typo there. stuParam.drop = true; should be stuParams.drop = true;
Comment by Nitin K.
1308 | March 02, 2017 06:55:30 AM GMT
Doh! - apologies
Comment by Jens l.
1309 | March 03, 2017 05:07:07 PM GMT