Hi All
I am working on an application in which previously connection was made using dmjdbc 5.3 . Now I want to rewrite the code using DFS 6.7
In earlier code Documents were fetched using
if (format == null || format.equals(""))
stat = conn.prepareCall("{? = call getfile(" + objid + ")}");
else
stat = conn.prepareCall("{? = call getfile(" + objid + ",,"+format+")}");
stat.registerOutParameter(1, Types.VARCHAR);
stat.execute();
fileName = stat.getString(1);
where conn is documentum type connection.
But now I am trying to fetch the document using new way (DFS 6.7)
com.documentum.fc.client.IDfDocument doc = (com.documentum.fc.client.IDfDocument)idfSession.getObject(new com.documentum.fc.common.DfId(objid));
com.documentum.fc.client.IDfFormat myFormat = idfSession.getFormat(doc.getContentType() );
filePath = documentRootDir +"
"+ doc.getObjectName() + "." + doc.getContentType();
doc.getFileEx2 (filePath,doc.getContentType(),0,"",false);
fileName_new= doc.getObjectName() + "." + doc.getContentType();
But after implementing this way I am not able to open any documents in there original format.Documents get opened in the same IE window in different format.
Please let me know if I Have adopted a wrong way to fetch the documents