I have a secondary data connection to a custom SP 2010 list using IP 2007 called "FilterOwssrv".
FilterOwssrv url is: https:///_vti_bin/owssvr.dll?XMLDATA=1&List={list guid}
I know that it will retrieve my data as if I hardcode the filters to the end of my url it will return the XML doc with the single record I am looking for from my list.
Here is my routine for rebuilding Secondary Data Connection but I keep getting error messages about "Invalid Token"
private void SetFPDSOptions()
{
MessageBox.Show(GetJoinValue());
XPathNavigator nav = this.CreateNavigator();
string spListJoin = (string)nav.SelectSingleNode("XPathNavigator nav = this.CreateNavigator();", this.NamespaceManager).ValueAs(typeof(string));
FileQueryConnection q = (FileQueryConnection)this.DataConnections["FilterOwssvr"];
q.FileLocation = q.FileLocation + "&FilterField1=Join&FilterValue1=" + GetJoinValue();
try
{
q.Execute();
}
catch (Exception ex)
{
MessageBox.Show("Failed to query." + System.Environment.NewLine + ex.Message);
}
}
So I have my existing secondary data connection fields on my form so that when I change the connection by adding the filter it will auto populate my form
Please help!!!!
Thanks,
Bragaidan