If you set the Need Target Application Directory configuration setting to True, the first time the user runs Stonefield Query, it prompts them to specify the location of the target application. If you want a default value for this location (for example, if your application is normally installed in C:\Program Files\MyApplication, you might want that to be the default), return the value from the Application.GetDefaultTargetAppDir script.
Parameters
A reference to the Stonefield Query Application object.
Return Value
The default value for the target application's location.
Example
This example returns C:\Program Files\MyApplication as the default location.
Visual FoxPro
lparameters toApplication as SQApplication
return 'C:\Program Files\MyApplication'
VBScript
function Main(Application)
Main = "C:\Program Files\MyApplication"
end function
JavaScript
function Main(Application) {
return "C:\\Program Files\\MyApplication";
}
C#
Please note that the method in this script must be named Application_GetDefaultTargetAppDir.
public static string Application_GetDefaultTargetAppDir(SFQApplication sfqApplication)
{
return "C:\\Program Files\\MyApplication";
}
VB.NET
Please note that the method in this script must be named Application_GetDefaultTargetAppDir.
public shared function Application_GetDefaultTargetAppDir(sfqApplication as SFQApplication) as string
return "C:\Program Files\MyApplication"
End Function
See also
Application.ValidateTargetAppDir | Need Target Application Directory | Scripts© Stonefield Software Inc., 2023 • Updated: 06/06/16
Comment or report problem with topic