Querying Sharepoint server from dotnet
-
Hi all, first i tried using ADO
ConnectionClass connection = new ConnectionClass(); CommandClass command = new CommandClass(); RecordsetClass rs = new RecordsetClass(); connection.Open("Provider=msdaipp.dso;Data Source=http://pandora/radar", null, null, -1); command.ActiveConnection = connection; command.CommandText = @"select ""DAV:displayname"" from scope('deep traversal of ""/radar/documents""')"; ArrayList list = new ArrayList(); try{ rs.Open(command, null, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.LockTypeEnum.adLockUnspecified, -1); while (!rs.EOF){ list.Add(rs.Fields[0].Value); } } catch(Exception e){ throw new Exception(e.Message, e); }
but this always fails with a (an ambigous and unhelpful)exception from a sharepoint dll from the rs.Open line. I was thinking their might be some security problem happening.. but theres no way to know. I've run similar code from my machine in a Word macro and it worked fine. Anyone tried this? [worldspawn]