Application.GetShortcutParameters has a similar purpose to Scheduler.GetCommandLine: it allows you to customize the command line for shortcut parameters. Unlike Scheduler.GetCommandLine, it doesn't accept the current command line as a parameter. Instead, simply return anything you want added to the command line use for the shortcut.

Parameters
A reference to the Stonefield Query Application object.

Return Value
Additional parameters to add to the command line for the shortcut/

Example
Here's an example that's related to the example discussed in the help topic for the Parameters collection. It adds a "dbpassword" parameter to the command line for the shortcut (in a real-world case, the password should be passed as encrypted text and decrypted in the OpenDataSource script rather than using plain text).

Visual FoxPro

lparameters toApplication as SQApplication
return 'dbpassword=MyPassword'

VBScript

function Main(Application)
Main = "dbpassword=MyPassword"
end function

JavaScript

function Main(Application) {
return 'dbpassword=MyPassword' ;
}

C#

Please note that the method in this script must be named Application_GetShortcutParameters.

public static string Application_GetShortcutParameters(SFQApplication sfqApplication)
{	
  return "dbpassword=MyPassword";
}

VB.NET

Please note that the method in this script must be named Application_GetShortcutParameters.

public shared function Application_GetShortcutParameters(sfqApplication as SFQApplication) as string
 Return "dbpassword=MyPassword"
End Function

See also

Scripts

© Stonefield Software Inc., 2023 • Updated: 06/06/16
Comment or report problem with topic