accpac.advantage - open dbLink connection and how to close

SOLVED

I am trying to write c# code around opening a Sage 300 Connection using C#. I am using the Acccpac.Advantage DLL.

Here is my code

try

{

     sage300Session.Init("", "XY", "XY1000", "62A");

     sage300Session.Open(_user, _ppswd, _companyID, DateTime.Today, 0);

 // Open a database link.
  sage300DbLink = sage300Session.OpenDBLink(DBLinkType.Company, DBLinkFlags.ReadWrite);
// if i have a valid user and company, i always get to here no matter the password
}

The issue I am having is, no matter what I put in the password, the call to .Open seems to succeed. If I put an invalid user or companyID, I get errors as expected. (the connestion status seems to say open either way).

My question is - what is happening with the password that is doesn't seem to be used and 2- when I am through with what I am doing, is there a way to correctly close the connection?

The Accpac.Advantage dll is v 2.0.50727 and I am connecting to Sage 300 2014 environment.