Try String formName = "HPD_Help_Desk" in stead. IF your DB uses "ODBC Underscore" that should (hopefully) sort it out
Regards, John M, London, England; On 7/23/07, bswrchrd <[EMAIL PROTECTED]> wrote:
I'm not sure Stephen. I haven't had any issues with the form name. I can do a Count on the returned collection and get a number back. On Jul 23, 6:48 am, "Heider, Stephen" <[EMAIL PROTECTED]> wrote: > Should [ String formName = "HPD:Help Desk"; ] be [ String formName = > "HPD:HelpDesk"; ] instead? No space between Help and Desk. > > Stephen > > -----Original Message----- > From: Action Request System discussion list(ARSList) > > [mailto:[EMAIL PROTECTED] On Behalf Of bswrchrd > Sent: Sunday, July 22, 2007 11:57 PM > To: [EMAIL PROTECTED] > Subject: Question about EntryFieldValueList > > I am newbie and trying to display the values in the fields associated > with a entryfieldvaluelist using the following C# code: > > using System; > using System.Collections.Generic; > using System.Text; > using BMC.ARSystem; > using BMC.ARSystem.Utilities.Common; > > namespace BMC.ARSystem > { > public class Search > { > static void Main(string[] args) > { > if (args.Length == 0) > { > Console.WriteLine("No arguments submitted"); > Console.ReadLine(); > return; > } > > String serverName = string.Empty; > String userName = string.Empty; > String password = string.Empty; > String formName = "HPD:Help Desk"; > > try > { > serverName = args[0].ToString(); // first arg-the > key > userName = args[1].ToString(); // second arg-the > value > password = args[2].ToString(); // third arg-the > value > } > catch > { > Console.ReadLine(); > return; > } > > { > ARSystem.Server ARServer = new ARSystem.Server(); > ARServer.Login(serverName, userName, password, ""); > > String qual = "1=1"; > > BMC.ARSystem.EntryListFieldList elfl = new > BMC.ARSystem.EntryListFieldList(); > elfl.AddField(0); > > BMC.ARSystem.EntryFieldValueList efvl = new > BMC.ARSystem.EntryFieldValueList(); > efvl = ARServer.GetListEntryWithFields(formName, qual, > elfl, Convert.ToUInt32(0), Convert.ToUInt32(99)); > > int i = efvl.Count - 1; > int j; > for (j = 0; j < i; i += 1) > { > string entryID = efvl.Item(i).EntryID; > Console.WriteLine(entryID); > > } > } > } > } > } > > I keep receiving an error : > > Error 1 'BMC.ARSystem.EntryFieldValueList' does not contain a > definition for 'Item' C:\VS2005\Projects\RemedySearch\RemedySearch > \Program.cs 59 47 RemedySearch > > What's weird is that I built a Powershell script that will retrieve the > data, everything is fine, but I would like to be able to compile the > code. I know I'm missing something but I can't figure out what is it. If > anybody can see it TIA. > > ________________________________________________________________________ > _______ > UNSUBSCRIBE or access ARSlist Archives atwww.arslist.orgARSlist:"Where > the Answers Are" > > _______________________________________________________________________________ > UNSUBSCRIBE or access ARSlist Archives atwww.arslist.orgARSlist:"Where the Answers Are" _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"
_______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"