| 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') ;
}See Also
Scripts
| Last Updated: 02/11/2008 |