Skip to main content

I have found several questions posted here that are similar to this but none of them have received answers and it has been about 4 years, so I figured I'd give it a try.

I am using the Maximiser Customisation Suite in a .Net application to access some of my Maximiser information.

However I've run into a brick wall in the fundamentals.

I am using the MaHost object to try and connect to an address book. My code looks like this:

 
            _session = new MaHost();
            _targetDSN = targetDSN;
            
            //Initiate the connection with Maxmizer's Address Book
            _session.Init(MaName, "DSN=MAS_" + _targetDSN, 5, "", "");

            //Verify that a user has access rights before granting a connection handle. 
            //This method must be performed in order to obtain a connection handle.
            bool canConnect = _session.DBLoginCheck("", _userName, _password, out _loginStr);
            if (!canConnect)
            {
                 throw new ArgumentException("Invalid userID or password. Connection to maximizer book has failed.");
            } 



Straight out of the Customisation Suite manual. This code works for 2 of my address books, but is failing on the third and I have no idea why.

Basically it is telling me that my user name and password are incorrect. However I test them by logging into the address book through the maximiser application and all works fine. The DSN and address book name are both correct. The code works because I use it with other address books.

Not sure what could be wrong, I would really appreciate some input.
Original Post
I would suggest you start by checking the log file on the SQL server to see if it is recording log-in failures. If these are present then you have somewhere to start. This might relate to the databases having been moved from another server. I think possibly you might also check that the DSN you are using is correctly configured. I don't think it's the case here, however, a previous renaming of the database might also be the cause of the issue (ie the name you see in Maximizer is not the same as the database name on server)

Add Reply

Post
LEGAL INFO
CONTACT US
Copyright 2007-2018 Advoco Solutions Ltd. All Rights Reserved.
×
×
×
×
Link copied to your clipboard.
×