moss

How do I handle SharePoint exceptions?

匆匆过客 提交于 2019-11-30 20:01:12
问题 I`m new to SharePoint, so I guess how do I need to handle exceptions? When I write custom code do I have to check for them or maybe, if they are thrown, they automatically get logged and don't break the app? If not, then how do I log them? Thank you! Edit: And how should I log those exceptions? 回答1: Use this to write to the log: http://msdn.microsoft.com/en-us/library/aa979522.aspx Unless you handle your exceptions the application will most likely break. Some errors such as those generated in

MAX query using CAML

本秂侑毒 提交于 2019-11-30 19:57:35
I want to select a sharepoint list item which has the Maximum value for a particular column. How can I do this using CAML queries? <Query> <OrderBy> <FieldRef Name="particularcolumn" Ascending="FALSE" /> </OrderBy> </Query> The following CAML query would return the maximum value for a given column: var maxValue; try { using (SPSite objSite = new SPSite(sSiteUrl)) { using (SPWeb objWeb = objSite.OpenWeb()) { SPList objList = objWeb.Lists[sListName]; SPQuery objQuery = new SPQuery(); objQuery.Query = "<OrderBy><FieldRef Name='ColumnName' Ascending='False' /></OrderBy><RowLimit>1</RowLimit>";

What setup do you use for SharePoint (WSS/MOSS) development?

十年热恋 提交于 2019-11-30 16:28:51
I'm curious to know how other SharePoint developers setup their dev workstations. My current setup: Desktop with Server 2008 (only for Hyper-V, was using Vista before) Use Visual Studio 2008 on local machine for dev work Keep a local copy of SharePoint DLLs for referencing, no local SharePoint install Run SharePoint in a Server 2003 VM hosted on my local machine I develop all my SharePoint changes as a WSP and install them into the VM for testing. I don't run code in debug mode, but do write lots of trace statements to watch what my code is doing. Also, when I'm making quick changes, I

What setup do you use for SharePoint (WSS/MOSS) development?

不想你离开。 提交于 2019-11-30 16:08:44
问题 I'm curious to know how other SharePoint developers setup their dev workstations. My current setup: Desktop with Server 2008 (only for Hyper-V, was using Vista before) Use Visual Studio 2008 on local machine for dev work Keep a local copy of SharePoint DLLs for referencing, no local SharePoint install Run SharePoint in a Server 2003 VM hosted on my local machine I develop all my SharePoint changes as a WSP and install them into the VM for testing. I don't run code in debug mode, but do write

Developer Documentation: Sharepoint Document Management vs. ScrewTurn Wiki [closed]

大城市里の小女人 提交于 2019-11-30 11:48:41
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Background Info I am working on setting up a method for my company's developers to share documentation and information about our

Can I copy files to a Network Place from a script or the command line? [closed]

廉价感情. 提交于 2019-11-30 08:47:24
Is it possible, in Windows XP, to copy files to a Network Place from the command line, a batch file or, even better, a PowerShell script? What sent me down this road of research was trying to publish files to a WSS 3.0 document library from a user's machine. I can't map a drive to the library in question because the WSS site is only available to authenticate via NTLM on a port other than 80 or 443. I suppose I could alternately use the WSS web services to push the files out, but I'm really curious about the answer to this question now. Using a batch file, you can both log on to the resource

MAX query using CAML

♀尐吖头ヾ 提交于 2019-11-30 03:32:32
问题 I want to select a sharepoint list item which has the Maximum value for a particular column. How can I do this using CAML queries? 回答1: <Query> <OrderBy> <FieldRef Name="particularcolumn" Ascending="FALSE" /> </OrderBy> </Query> 回答2: The following CAML query would return the maximum value for a given column: var maxValue; try { using (SPSite objSite = new SPSite(sSiteUrl)) { using (SPWeb objWeb = objSite.OpenWeb()) { SPList objList = objWeb.Lists[sListName]; SPQuery objQuery = new SPQuery();

Serialization in C# without using file system

牧云@^-^@ 提交于 2019-11-30 02:59:59
I have a simple 2D array of strings and I would like to stuff it into an SPFieldMultiLineText in MOSS. This maps to an ntext database field. I know I can serialize to XML and store to the file system, but I would like to serialize without touching the filesystem. public override void ItemAdding(SPItemEventProperties properties) { // build the array List<List<string>> matrix = new List<List<string>>(); /* * populating the array is snipped, works fine */ // now stick this matrix into the field in my list item properties.AfterProperties["myNoteField"] = matrix; // throws an error } Looks like I

How can I include value of sharepoint's version column in a word document?

徘徊边缘 提交于 2019-11-29 20:49:29
I'm trying to work out a way to display the contents of the version column from SharePoint (i.e. the value that changes every time a file is checked in) as a field (or something similar) inside of a Word document. Ideally, I'd like to know how to configure SharePoint so I could click something like "Insert > Quick Parts > Document Property > Version", and it would include the version in the document. The goal is to make it easier for someone to correlate a printed version of a document with the version history of SharePoint. I have been able to add editable text columns to the Document content

Exporting SharePoint usage log files into a database using LogParser

只愿长相守 提交于 2019-11-29 15:39:53
问题 So basically we have lots of SharePoint usage log files generated by our SharePoint 2007 site and we would like to make sense of them. For that we're thinking of reading the log files and dumping into a database with the appropriate columns and all. Now I was going to make an SSIS package to read all the text files and extract the data when I came across LogParser. Is there a way to use LogParser to dump data into an Sql Server database or the SSIS way is better? Or is there any other better