@DbLookupFailing

We have this code which is inteneded to search another database (DatabaseB) on the same server as the current Database (Database A) is on.

There is a field on a form in Database A called “RepID_mal”. This field holds the replica ID of Database B.

The code for another field on the same form is:

viewvalues := @DbLookup(“”:“NoCache”;repid_mal;“(group by requestor)”; @Name([Abbreviate];@UserName); “group”);

@If(viewvalues = “”;

     @Return(@Prompt([Ok];"Error";"You cannot create a Request Document because you have not been set up as a requestor of any group. Please contact the Administrator to set up as a requestor for your group."));

    status = "Draft";

            @If(

                  @Elements(viewvalues) = 1; viewvalues;

                  @Prompt([OkCancelList];"Select your group / department"; "Please select your group / department"; ""; viewvalues));

     group)

Whave 3 servers which these db’s are on. When we shut down serverA and ServerB and the users then use ServerC, the RepID_mal replica ID can not be found if the Icons on their workspace are stacked and the db icon is noot the top stacked icon, or they have not opened up the replica on ServerC yet. The get a “Server not responding…” error.

I was wondering if this would work:

viewvalues := @DbLookup(“”:“NoCache”;@ServerName:repid_mal;“(group by requestor)”; @Name([Abbreviate];@UserName); “group”);

By reading the Help DB it seems that it would still serach the desktop Icons first. Am I understanding this correctly?

Should I use This code instead (not preferred):

viewvalues := @DbLookup(“”:“NoCache”;@ServerName:“DatabaseB.nsf”;“(group by requestor)”; @Name([Abbreviate];@UserName); “group”);

I would preferr not to use the last method because I setting it up for fail if the DB filename is changed or file path changes.

Subject: RE: @DbLookupFailing

It looks like you could answer your own question with a little experiment.