Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web Services dies after eight method calls
Message
 
À
10/01/2002 11:12:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
00602952
Message ID:
00603023
Vues:
27
Mike:

Here is a little snippet of the Web Service. If I instantiate it and run the login method 8 times from the VFP command window, on the 8th try it bombs. Thanx for helping. Finally getting my first opportunity to do a web app so I'm running into some snags.


DEFINE CLASS WSMain AS SESSION OLEPUBLIC

PROCEDURE INIT
LOCAL cHomedir

cHomeDir = IIF(_VFP.StartMode = 5, JUSTPATH(_vfp.ServerName), SUBSTR(JUSTPATH(SYS(16, 0)), 22))
SET DEFAULT TO (cHomedir)
SET PATH TO (cHomedir + '\data')
SET PROCEDURE TO Procfile
OPEN DATABASE ATS SHARED

USE Acat IN 0
USE Acat2 IN 0
USE Aap IN 0
USE Login IN 0

ENDPROC


PROCEDURE DESTROY
CLOSE DATABASE ALL
ENDPROC


PROCEDURE Error(nError, cMethod, nLine)
LOCAL cMessage
cMessage = 'Error: ' + TRANSFORM(nError) + ' - ' + MESSAGE()
COMRETURNERROR(cMethod, cMessage)
ENDPROC


*=========*
*- Login -*
*=========*
FUNCTION Login (cUsername AS STRING, cPassword AS STRING) AS BOOLEAN

SELECT Login
LOCATE FOR UPPER(ALLTRIM(Login.username)) = UPPER(ALLTRIM(cUsername)) ;
.AND. UPPER(ALLTRIM(Login.PASSWORD)) = UPPER(ALLTRIM(cPassword))

IF FOUND()
RETURN .T.
ELSE
RETURN .F.
ENDIF

ENDFUNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform