Sharepoint 2007 - Document Property not saving if the column name is 'Title'

Hi
I have a rather bizarre error in Sharepoint 2007.
I have a web part where I upload a document to a Document Library..
I allow the user to enter in the properties of the document and it all saves up to the Document Library fine.

All the properties get saved except for 'Title'

So the problem is here ....

docProperties["Publication Title"] = tbTitle.Text;
docProperties["Title"] = tbTitle.Text;

When I look at the documents in the document library it will have a value for 'Publication Title' but not for 'Publication'

I have checked the 'internal names' of the columns by sorting the document library by the relevant column ...

So if for example I click on the 'Circulation' column I can see this in the URL ...

...Documents/Forms/AllItems.aspx?SortField=Circulation&SortDir=Asc...

And if I click on the 'Title' column I can see this in the URL ...

...Documents/Forms/AllItems.aspx?SortField=Title&SortDir=Asc...

So it seems I have the correct name for the column 'Title'

Any ideas why it's not saving this one property?
using (SPSite oSite = new SPSite(sharePointSite))
            {
                using (SPWeb oWeb = oSite.OpenWeb())
                {
                    if (System.IO.File.Exists(PDFFileWaitingPath))
                    {
                        SPFolder myLibrary = oWeb.Folders[documentLibraryName];

                        if (myLibrary.UniqueId == null)
                        {
                        }


                        // Prepare to upload 
                        Boolean replaceExistingFiles = true;
                        String fileName = System.IO.Path.GetFileName(PDFFileWaitingPath);
                        FileStream fileStream = File.OpenRead(PDFFileWaitingPath);

                        Hashtable docProperties = new Hashtable();
                        docProperties["Publication Title"] = tbTitle.Text;
                        docProperties["Title"] = tbTitle.Text;
                        docProperties["Category"] = ddlCategory.SelectedIndex + 1;
                        docProperties["Circulation"] = tbCirculation.Text;
                        docProperties["Page"] = tbPage.Text;
                        docProperties["Publication"] = ddlPublication.SelectedIndex + 1;
                        docProperties["Publication Author"] = tbAuthor.Text;
                        docProperties["Publication Date"] = dtcPublicationDate.SelectedDate;
                        docProperties["Posted Date"] = DateTime.Now;
                        docProperties["Summary"] = tbSummary.Text;
                        docProperties["Rank"] = tbRank.Text;

                        // Upload document 
                        SPFile spfile = myLibrary.Files.Add(fileName, fileStream, docProperties, replaceExistingFiles);
                        
                        // Commit  
                        myLibrary.Update();

                        fileStream.Close();

                        // To move a file or folder to a new location:
                        System.IO.File.Move(PDFFileWaitingPath, PDFFilePublishedPath);
                        System.IO.File.Move(XMLFileWaitingPath, XMLFilePublishedPath);

                        
                        


                    }
                    else
                    {
                        throw new FileNotFoundException("File not found.", PDFFileWaitingPath);
                    }
                }
            }

Open in new window

hmcgeehanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mo1oneCommented:
Please click on Publication Title and check the name after Sort (similar to what you did for Title). It would have chars like x020 in between Publication and Title instead of space.  Please use that name in code.
 
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hmcgeehanAuthor Commented:
...Documents/Forms/AllItems.aspx?SortField=Publication%5fx0020%5fTitle&SortDir=Asc...

But it DOES save the property for 'Publication Title'
It DOESNT save the property for 'Publication'

Thanks
0
hmcgeehanAuthor Commented:
And all the other properties with a space in them save fine too ...

docProperties["Publication Author"] = tbAuthor.Text;
                        docProperties["Publication Date"] = dtcPublicationDate.SelectedDate;
                        docProperties["Posted Date"] = DateTime.Now;

The problem is that this one ...

docProperties["Title"] = tbTitle.Text;

Doesn't save (even if there is a value for tbTitle.Text

thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.