| Stonefield Query SDK |
| Application.BeforeLogin |
Parameters
A reference to the Stonefield Query Application object.
Return Value
True if the application should continue, False if it should terminate.
Example
Visual FoxPro
This example logs the user in using their network ID (this code assumes the password is the same as the user name).
lparameters toApplication as SQApplication local lcUser, lcName, lnSize, llReturn lcName = chr(0) lnSize = 64 lcUser = replicate(lcName, lnSize) declare integer WNetGetUser in Win32API ; string@ cName, string@ cUser, integer@ nBufferSize WNetGetUser(@lcName, @lcUser, @lnSize) lcUser = left(lcUser, at(chr(0), lcUser) - 1) if not empty(lcUser) llReturn = toApplication.Users.Login(lcUser, lcUser) endif not empty(lcUser) return llReturn
VBScript
This example simply logs the user in as ADMIN.
function Main(Application)
Main = Application.Users.Login("ADMIN", "ADMIN")
end function JavaScript
This example simply logs the user in as ADMIN.
function Main(Application) {
return Application.Users.Login('ADMIN', 'ADMIN') ;
} C#
This example simply logs the user in as ADMIN.
Please note that the method in this script must be named Application_BeforeLogin.
public static bool Application_BeforeLogin(SFQApplication sfqApplication)
{
return sfqApplication.Users.Login("ADMIN", "ADMIN");
} VB.NET
This example simply logs the user in as ADMIN.
Please note that the method in this script must be named Application_BeforeLogin.
public shared function Application_BeforeLogin(sfqApplication as SFQApplication) as Boolean
return sfqApplication.Users.Login("ADMIN", "ADMIN")
End FunctionSee Also
Scripts
| Last Updated: 06/10/10 |