Link to home
Start Free TrialLog in
Avatar of fayeb
fayeb

asked on

Specifying the server and directory

Please help I need to specify the current server and directory of the database on the server on local machine for remote users.  At present I do a DB_Look in a view with the path and database name but this is a pain to maintain with 15 databases.

The server is "Development"
The path is "\ABCWorks\Development\Version1"
The database is "Supplier.nsf"

The code I use at present is as follows

ServerName:= @Name([CN]; @Subset(@DbName;1) );
DB_PATH := @DbLookup(""; ""; "LookUp"; "DB_Path";2);
DB_Lookup := @DbLookup(""; ""; "LookUp"; "DB_Name00";2);
DB_Loc :=DB_PATH+DB_Lookup;

list:= @DbColumn("";ServerName:DB_Loc;"F11LookUp";1);
supplier := @Prompt([OKCANCELLIST];"Select Supplier"; "Select a Supplier from the list";"";@Unique(list));

I have a piece of code but for some reason it doesn't work

SubDir := @LeftBack(@Subset(@DbName;1) ;"\\");
DB_Name := @if(SubDir = "";"";SubDir + "\\") + "Supplier.nsf";

Please help
ASKER CERTIFIED SOLUTION
Avatar of Gunsen
Gunsen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fayeb
fayeb

ASKER

Thank you very much for your help