Hi merjin,
see below code : by using .ini file as your configuration file, you can point your data to your lan.
see below code on how to implement it :
GLOBAL
gsFileDir is string // Data Directory
gsFileDirlocal is string
gsUserName,gsGloginname is string // Name of Current User
gsGlogname ,gsMessagefrom is string
gsCommcheck is string
sX1Wlocation is string
sX1Itemlocation is string
sX1Itemcode is string
nX1qty is int
gdSX1date is string(10);
gsOrderno is string
gbReceipts, gbTransactions, gbInventory , gbViews , gbOptions , gbItemremove is boolean
// gsCommcheck = "local";
// Content of Configuration File
sConfiguration is string
sConfigurationlocal is string
// Open the overview window
//Presentation()
// Load the configuration
// Open the overview window
LOCAL
//Open(OfrmNetwork);
//sConfiguration =fLoadText(CompleteDir(fExeDir())+"local.ini")
// sConfiguration =fLoadText(CompleteDir(fExeDir())+"local.ini")
IF YesNo("Do you want to use Remote Data...?") = Yes THEN
NextTitle("Warning Message...");
Info("Pls. make sure that the WIFI is connected...");
sConfiguration =fLoadText(CompleteDir(fExeDir())+"config.ini")
ELSE
sConfiguration =fLoadText(CompleteDir(fExeDir())+"local.ini")
END
// info(sConfiguration);
// Data Directory
IF NOT ExtractString(sConfiguration,1,CR)~="" AND NOT ExtractString(sConfiguration,1,CR)~=EOT THEN
gsFileDir = ExtractString(sConfiguration,1,CR)
//info(sConfiguration);
// Open(OfrmUsersLogin1);
// Close(OfrmNetwork);
END
IF NOT gsFileDir~="" THEN
HSubstDir(".",gsFileDir) // change directory of DATABASE
Open(frmUsersLogin);
// Open(frmSupplierReceipt);
ELSE
NextTitle("Error Message...");
Info("Network Error Detected.....Try Again");
END