Hi ,
I want to update the 2 columns in one table based on r_object_id using documentum 6.5ver.
Below is the code and let me know any changes i have to do. same code its working for select statement but its not working for update statement.
While update the columns using below querystring.. i am getting the "Query Action Failed" error. but i am using the select query string its returns the result set.
Please help me..
Dim queryString As String = String.Empty
queryString = "update customercontract_s set locationnum='555555' where r_object_id= '" + storageID + "'"
Dim queryService As New QueryServiceReference.QueryServicePortClient("QueryServicePort")
Using scope As New ServiceModel.OperationContextScope(queryService.InnerChannel)
Dim scx As New ServiceContextHeader
Dim repoId As New RepositoryIdentity
repoId.userName = ConfigurationManager.AppSettings("hmisuserName")
repoId.password = ConfigurationManager.AppSettings("hmispassword")
repoId.repositoryName = ConfigurationManager.AppSettings("repositoryName")
scx.AddRepositoryIdentity(repoId)
OperationContext.Current.OutgoingMessageHeaders.Add(scx)
Dim query As New QueryServiceReference.PassthroughQuery
query.queryString = queryString
Dim str(0) As String
query.repositories = str
query.repositories(0) = ConfigurationManager.AppSettings("repositoryName")
Dim queryEx As New QueryServiceReference.QueryExecution
queryEx.cacheStrategyType = QueryServiceReference.CacheStrategyType.DEFAULT_CACHE_STRATEGY
queryEx.cacheStrategyTypeSpecified = True
queryEx.maxResultCount = 100
Dim results As QueryServiceReference.QueryResult
results = queryService.execute(query, queryEx, Nothing)
If results.dataPackage.DataObjects.Length > 0 Then
Dim strng As String
strng = "Updated successfully"
End If
End Using