Community
Showing results for 
Search instead for 
Do you mean 
Reply

Questions on Framework.Logon in ACT 2008 using .NET

New Member
Posts: 7
Country: United Kingdom

Questions on Framework.Logon in ACT 2008 using .NET

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.

 

 

Nickel Super Contributor
Posts: 441
Country: UK

Re: Questions on Framework.Logon in ACT 2008 using .NET

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

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Questions on Framework.Logon in ACT 2008 using .NET

[ Edited ]

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

Message Edited by vivek on 09-30-2008 10:40 AM
Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
New Member
Posts: 7
Country: United Kingdom

Re: Questions on Framework.Logon in ACT 2008 using .NET

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?

Copper Contributor
Posts: 16
Country: New Zealand

Re: Questions on Framework.Logon in ACT 2008 using .NET

Hi Tdavis, for your second point, I think on any machine you logon from, you only need to have the dlls in the GlobalAssemblyCache folder, not necessarily need an ACT! installed, please correct me if wrong
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Questions on Framework.Logon in ACT 2008 using .NET

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! Smiley Very Happy 

 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog