Copy link to clipboard
Copied
hi,
how to change stDSN.enable_clob and stDSN.enable_blob areas while add datasource with adminapi?
I want to add datasource. and this datasource include clob and blob area.This area doesn't change even though stDSN.enable_clob = "YES .
summary, I want to come to marked Clob checkbox.(Enable long text retrieval (CLOB). )
Codes:
....
stDSN.maxpooledstatements = 999;
stDSN.enableMaxConnections = "YES";
stDSN.maxConnections = "299";
stDSN.enable_clob = "YES";
stDSN.enable_blob = "NO";
stDSN.disable = "NO";
stDSN.storedProc = "YES";
stDSN.alter = "YES";
.....
Can I help me? I adduce this image.
Copy link to clipboard
Copied
orijinal codes:
<cfscript>
// Login is always required. This example uses a single line of code.
createObject("component","cfide.adminapi.administrator").login("admin");
// Instantiate the data source object.
myObj = createObject("component","cfide.adminapi.datasource");
// Required arguments for a data source.
stDSN = structNew();
stDSN.driver = "MSSQLServer";
stDSN.name="northwind_MSSQL";
stDSN.host = "10.1.147.73";
stDSN.port = "1433";
stDSN.database = "northwind";
stDSN.username = "sa";
// Optional and advanced arguments.
stDSN.login_timeout = "29";
stDSN.timeout = "23";
stDSN.interval = 6;
stDSN.buffer = "64000";
stDSN.blob_buffer = "64000";
stDSN.setStringParameterAsUnicode = "false";
stDSN.description = "Northwind SQL Server";
stDSN.pooling = true;
stDSN.maxpooledstatements = 999;
stDSN.enableMaxConnections = "true";
stDSN.maxConnections = "299";
stDSN.enable_clob = true;
stDSN.enable_blob = true;
stDSN.disable = false;
stDSN.storedProc = true;
stDSN.alter = false;
stDSN.grant = true;
stDSN.select = true;
stDSN.update = true;
stDSN.create = true;
stDSN.delete = true;
stDSN.drop = false;
stDSN.revoke = false;
//Create a DSN.
myObj.setMSSQL(argumentCollection=stDSN);
</cfscript>
<!--- Optionally dump the stDSN structure. --->
<!---
<cfoutput>
<cfdump var="#stDSN#">
</cfoutput>
--->
Copy link to clipboard
Copied
Interesting. I am having the same issue. I tested with the code below, and although my DSN is created, the BLOB and CLOB fields are not set to true. Anyone else have any insight they can offer?
<cfset admin = createObject("component", "CFIDE.adminapi.administrator").login("password") /> <cfset ds = createObject("component", "CFIDE.adminapi.datasource") /> <cfset ds.setMSSQL( driver = "MSSQLServer", name = "testDSN", host = "myhost", port = "1433", database = "myDatabase", username = "sa", password = "password", enable_clob = true, enable_blob = true ) />
Copy link to clipboard
Copied
Can you solve this problem? Unfortunalety,My problem still continues.Although my DSN is created, the BLOB and CLOB fields are not set to true to.
can you help me urgently?
Copy link to clipboard
Copied
The parameters enable_clob and enable_blob don't exist in that method. You need this instead:
...
disable_clob = false,
disable_blob = false
...
Seems to work on my development box at any rate.
Copy link to clipboard
Copied
I tried your suggestions.But blob and clob fields are not set to true.:((((Do you have another suggestion?
Copy link to clipboard
Copied
I don't. What version of ColdFusion Server are you running? Not sure if it matters, but curious.
Copy link to clipboard
Copied
I use Coldfusion 9.Please find a soluation. But this problem very very important me.