09-29-2008 08:46 AM
Forgive me if these questions have been answered or are obvious - just starting out:
1. Is there a way to specify using the "default d/b" i.e. i want to say
frwk.LogOn("user", "pword", "localhost", ????) where I want ??? to be something that means "pick the default / master db"
2. ACT location. If I log on to localhost, using something like frwk.LogOn("user", "pword", "localhost", "ACTContacts") all is well.
If I try and use the same code from another LAN connected machine, pointign back at the one with ACT on it: e.g.
frwk.LogOn("user", "pword", "192.168.1.105", "ACTContacts")
... I get
"Act.Framework.MissingMasterDatabaseException: Error in the application."
as though it cant find the d/b.?
3. Does anyone have any good reference material about the ins and outs of the LogOn() API so I can learn more in-depth stuff about the capabilities.
P.S. I am trying (in real-time) to relate a phone number to a contacts full name so probably want to ask late about any fuzzy matching capability in the API (so far it seems I have to try to pass exactly waht is stored for the contact search using
framework.Lookups.LookupContactsReplace to work - but that is tomorrows problem)
Many thanks for any pointers given.
09-30-2008 02:35 AM
1. The last opened db is stored in the registry at HKEY_CURRENT_USER\Software\ACT\LastOpenedDB, you can get the pad path from this key.
2. Try logging on using the pad file eg actfwk.logon(PadFilePath, User, Password) - I'm pretty sure you need to have act on the machine you are logging on from as well (someone may correct me on this as I have never tried otherwise)
3. There is no built in fuzzy matching into ACT!.
HTH
Tom
09-30-2008 02:38 AM - edited 09-30-2008 02:40 AM
hi sg,
not sure about 1. I dont think it would be possible without first logging into the dB to set the framework object. You might be able to do via the preferences xml and parsing through that. I have never done it so am not too sure.
2. you need to send a specific machine name as you might find in an LMHosts file not the ip. I have to admit I prefer using the frwk.Logon("fullPadFilePath", "user", "password" ) ; overload. Is ther a specific reason you need the (string, string, string, string ) ; overload?
3. not sure I fullly understand. There are some sample code in the sdk package.
p.s You can create a a specific lookup using the criteris class znd create lookups such as "starts with", contains, before etc. There should be some sample code for doing this.
edit<>: You could also think about possibly converting the ContacList into a Generic List and then using LINQ or Lambda exprs? Its not that great an idea if its a large list though!
HTH
Vivek
09-30-2008 02:49 AM
Tom, Vivek - thanks for the replies.
I can use the pad version of the API (string,string,string). Just wanted to know which was accepted as best to use.
The idea about the last db is great, and I see it in the registry.
I assume the LastUser setting is a valid thing to use as well?
12-04-2009 07:37 PM
12-10-2009 07:46 AM
Hiya zhili,
Yeah that's correct if you only intend to run SDK code for Framework objects. Obviously without ACT! installed you'll have issues running plugins and using the Act.UI; namespace code!