Expand my Community achievements bar.

Reader Extensions ES: Database connectivity

Avatar

Level 4
Environment:



LiveCycle ES 8.0.1 (SP1 not applied).

Windows Server 2003 Enterprise

SQL Server 2000



I need to get an extended PDF file to reliably connect to SQL Server 2000 and run arbitrary SQL statements using whatever domain credential the local machine is logged in with from Reader. I'm so far getting very mixed success.



I've read in the designer docs that the security model is updated with Reader 8, so I'm making sure to clone the connection before I work on it, e.g.:



> var oDB = xfa.sourceSet.spEmp.clone(1);



> var nDBIndex = 0;



> while(oDB.nodes.item(nDBIndex).className != "command") nDBIndex++;



> oDB.nodes.item(nDBIndex).query.select.nodes.item(0).value = "EXEC > EmployeeNames '"+xfa.resolveNode("form1.#subform[0].TextField1").rawValue+"'";



> oDB.open();



It also says that the file must be certified. I've created and used an internal CA to create a signing credential, and I've imported the CA as a trusted root into all the copies of Reader where I've tried the file. When I viewed the certified version there was also a warning about the date/time being from the local users machine, so I've also timestamped the document using http://timestamping.edelweb.fr/ and imported the relevant certs, and I get a full pass for validation.



Un-certified version of Reader Extended PDF file:



Reader 8 on XP - "Connection for Source spEmp failed because the environment is not trusted". (expected, due to new security restrictions)

Reader 8 on Vista (Acrobat also installed) - no error, appears to connect to database (yes/no dialog appears), but no data is retrieved and displayed on the form.

Reader 8 on Server 2003 - "Connection for Source spEmp failed because the environment is not trusted". (expected, due to new security restrictions)



Certified version, trusted CA, timestamped(trusted&validated):



Reader 8 on XP - fails silently, no attempt to connect to db.

Reader 8 on Vista (Acrobat also installed) - works perfectly

Reader 8 on Server 2003 (Acrobat also installed) - fails silently, no attempt to connect to db.



Has anyone had any success running arbitrary SQL statements in a Reader Extension ES enabled PDF file using the logged in Windows user credentials, and what did you do differently?



Also does Acrobat being installed on a machine with Reader affect the security model?
1 Reply

Avatar

Level 4
Updating the client machines to the very latest (8.1.1) release completely fixed the problem. If anyone else has issues with database connections silently failing then I would recommend trying this first (instead of last like me ;) ).