Hi All,
I have gone through quite many discussions on the web pertaining to this same issue of registering a table in Documentum.So here is a synopsis of my struggle:)
1) I had the need to have a new table inside my documentm database.So i created a new table through my SQL (Studio Express) manually (using click on Tables --> New Table)
2) I had the following lines in my function - an action event on a button click:
StringBuffer strQueryBufin = new StringBuffer(); strQueryBufin.append("Insert into dbo.dm_freeway_mapping Values ('").append(docuId).append("','").append(freewayID).append("','").append(freewayPwrd).append("')"); IDfCollection iCollectionin =null; DfQuery queryin = new DfQuery();queryin.setDQL( strQueryBufin.toString() );iCollectionin = queryin.execute( getDfSession(), DfQuery.DF_QUERY );
I had no knowledge of the need of an external table to be "registered" prior to its usage while writing the above code and hence i faced the following error:
15:38:44,704 ERROR [http-8080-2] com.documentum.web.common.Trace - invokeMethod() failed while calling: saveActionMapping
[DM_QUERY_E_TABLE_NO_ACCESS]error: "The table, dbo.dm_freeway_mapping, is not registered or you do not have access to it."
DfException:: THREAD: http-8080-2; MSG: [DM_QUERY_E_TABLE_NO_ACCESS]error: "The table, dbo.dm_freeway_mapping, is not registered or you do not have access to it."; ERRORCODE: 100; NEXT: null
at com.documentum.fc.client.impl.docbase.DocbaseExceptionMapper.newException(DocbaseExceptionMapper.java:57)
at com.documentum.fc.client.impl.connection.docbase.MessageEntry.getException(MessageEntry.java:39)
at com.documentum.fc.client.impl.connection.docbase.DocbaseMessageManager.getException(DocbaseMessageManager.java:137)
at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.checkForMessages(NetwiseDocbaseRpcClient.java:305)
at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.applyForCollection(NetwiseDocbaseRpcClient.java:429)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection$3.evaluate(DocbaseConnection.java:1143)
3) Having gone through a few similar instances on the net i have reached the following assumptions and these are my questions:
a) REGISTER TABLE dm_dbo.table_name (column list); -- is the syntax to register tables inside documentum.But they cannot be actually executed inside SQL ( i actually tried executing this command on SQL and soon realized that the REGISTER keyword is not even a registered one in SQL). Is my conclusion correct?
b) This syntax of registering a table needs to be written through DQL as seen in the Java code (for insert) seen under (2). Is my conclusion correct?
c) What should be the solution to register a table through java only once.Because if i have the query to register a table on every action event , this query will be fired as many times. How can i over come this situation? Is there a check akin to "if table exists" to dissallow the register query being fired multiple times?
I hope i will get the prompt support like i have recieved over the months from this wonderful learning curve called EMC Community.
Thanks & Regards
Vishnu Soman