06-22-2009 09:36 AM
Hi,
Maybe I am not even going about this correctly: I am trying to get the data out of the tables into data structures in C#, so that I can do some manipulation and reporting out on an internal webapp. I am just starting to try all this out, and am beginning with something very simple:
ActFrameWork work = new ActFrameWork(); work.LogOn(strPath, strUser, strPass);
which turns around and throws a MissingMasterDatabase exception, no matter what I try. I know the path is correct, because I can easily open other files in the same directory, etc. The directory isn't, however, on the same server. Is this a problem? Any other insights greatly appreciated, it is frustrating to be stuck on something so simple so early on. Thanks.
06-23-2009 04:29 PM
A missing master database exception essentially means it can't find a SQL Server Master database. Since it doesn't seem likely that you would have a ACT! SQL server instance with no master database, the exception may be a bit misleading. I would more readily suspect that you aren't really connecting to the SQL server you think you are, you are most likely hitting your own machine. Since you are getting the pad file from a network share, check to see if the pad file you are pointing to has a relative location the the SQL database that isn't resolvable from your machine. As an example from my dev box, here are the contents of a PAD file:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE ACTDatabasePADFile>
<!--This file represents a Pointer to an Act Database or [PAD]-->
<ACTDatabase name="test0618" host="." location="C:\Users\TFAUST\Documents\ACT\ACT For Windows 12\Databases" type="Sql" />
Note the host entry of "." This effectively means "localhost", If your PAD file looks this way, I think adding an actual computer name instead of a "." in the pad file would do the trick. Make a copy so you don't mess up others while you experiment
As an aside, I would think any SQL Server instance you do have without a master database is not exactly usable.
06-22-2009 09:22 PM
Um, two lines of code isn't terribly helpful, but I'll give it a go and see if this helps. It's in VB, but you should get the jist:
Dim ActFwk As New Act.Framework.ActFramework() ActFwk.LogOn(strPath, strUser, strPass)
06-22-2009 09:36 PM
I just pulled up a C# app, and noticed the VB code probably did not help. Here's a sample login on C#
ActFramework ACTFM = new ActFramework(); ACTFM.LogOn("C:\\Documents and Settings\\All Users\\Documents\\ACT\\ACT for Windows 11\\Databases\\ACT11Demo.PAD", "Chris Huffman", "");
06-23-2009 07:51 AM
06-23-2009 07:59 AM
Run actdiag (start -> Run -> actdig) - does it start without error or say could not connect to sql instance?
Tom
06-23-2009 04:29 PM
A missing master database exception essentially means it can't find a SQL Server Master database. Since it doesn't seem likely that you would have a ACT! SQL server instance with no master database, the exception may be a bit misleading. I would more readily suspect that you aren't really connecting to the SQL server you think you are, you are most likely hitting your own machine. Since you are getting the pad file from a network share, check to see if the pad file you are pointing to has a relative location the the SQL database that isn't resolvable from your machine. As an example from my dev box, here are the contents of a PAD file:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE ACTDatabasePADFile>
<!--This file represents a Pointer to an Act Database or [PAD]-->
<ACTDatabase name="test0618" host="." location="C:\Users\TFAUST\Documents\ACT\ACT For Windows 12\Databases" type="Sql" />
Note the host entry of "." This effectively means "localhost", If your PAD file looks this way, I think adding an actual computer name instead of a "." in the pad file would do the trick. Make a copy so you don't mess up others while you experiment
As an aside, I would think any SQL Server instance you do have without a master database is not exactly usable.
06-23-2009 04:32 PM
An even easier approach would be to use the logon matching the following signature:
public void LogOn(string userName, string password, string databaseHost, string databaseName)
This would allow you to unambiguously specify the SQL host, and not worry about PAD files.
07-06-2009 02:32 PM
Hi Tim,
I don't see that method for the ActFramework object. I'm using version 2009 SDK. Where is that method?
- tony
07-07-2009 01:27 AM
Dim actfwk As New Act.Framework.ActFramework
actfwk.LogOn(strUsr, strPass, strHost, strDB)
Tom