You are viewing limited content. For full access, please sign in.

Question

Question

Possible SDK Bug. Could someone test for me? Searching and spaces in the document name.

asked on January 16, 2019 • Show version history

Hi all,

I'm using SDK 10.0 on a 10.2 repository that started as a 7 (I think... mostly sure). At any rate, the import thing is that under a previous version of LF Client, users were able to create documents with trailing blanks in the name.

  • For example: "Hello World "

When I run try to sub-type a returned EntryInfo from a search, I get a very odd message:

  • "Invalid object name"

There's not much more than that.

To replicate, you'll have to add the trailing space to the docname in the TOC table, then restart the LF service.

Then run a search and try to set a new DocumentInfo object:

Using oSearchResultListing As SearchResultListing = oSearch.GetResultListing(oSearchListSettings) 
 For intX = 1 To oSearchResultListing.RowsCount 
'The following line will fail with "Invalid object name" 
 oDocumentInfo = oSearchResultListing.GetEntryInfo(intX) 

If you have a moment, could you try this?

The fix for the customer was to mass-update their toctable to remove trailing spaces. So am now just curious if anyone else has this issue.

-Ben

 

0 0

Answer

SELECTED ANSWER
replied on January 16, 2019

I can reproduce it with the latest version as well. Bug reference ID 151779.

0 0
replied on November 10, 2023

Hi Miruna,

With 10.4 of the .Net Framework API, I am still able to replicate this. The documents display fine in the LF Client (I forgot to check which version was being used.)

Is there a recommended way to code around this, or should all names be trimmed at the database end? 

0 0
replied on June 29

I can confirm the bug still exists. What is the workaround?

0 0
replied on June 30

Hi Bryan,

This was a while ago and i can't remember exactly but I found the code the snippet came from. 

It looks like I simply used the LF Client to perform a search of the LF repo, looking for all entries with a trailing space, and simply removed the trailing space.

I think the LF fix was to trim trailing spaces automatically from file names. 

Are you getting the error when setting the DocumentInfo object, as I was, or when setting an EntryInfo object? I think if yiou can set EntryInfo, you could at least rename the document first.

...or

Keeo your code as-is, surrounded by a try...catch, and generate a log of every failed document for manual lcorrection in LF.

Every data export project requires some data-cleansing, so I hopefully you have scope in project time-line for this and other issues you'll likely unconver.

-Ben

0 0
replied on June 30

This issue was fixed in RepositoryAccess 11 and higher. 

0 0

Replies

replied on January 16, 2019

Thanks Miruna

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.