Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fieldvalid-only first time fires
Message
De
17/01/2006 08:02:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
Fieldvalid-only first time fires
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Oracle
Divers
Thread ID:
01087465
Message ID:
01087465
Vues:
53
Hi,
This code is in fieldvalid method of txtTip control with Tip_o.Tip_obj controlsource.
The problem is that only when first time invoked it detects properly if any record with
such value exist. After that duplicate values are not signalized till commit in database. (ORA - .... ).
*
LOCAL s, v, _tip
_tip = ''
s    = 0 
_tip = this.value
*
v=SQLEXEC(thisform.oCDE.cdNesto.nConnID,;
"Begin SELECT COUNT(*) into ?@s from Tip_o Where Tip_o.TIP_OBJ=?@_tip;End;")
*
IF s > 0 
   thisform.oCDE.DisplayMessage('Tip  exists  ! - '+STR(s,2)+' '+_tip )
   RETURN .F.
ENDIF
*
Regards, Gojko

PS
Additional Q.:

Table Tip_o is defined in cmdataenvironment cdNesto as cursor: CursTip_o. Now,
how can I use native EXECUTE method of cursor CursTip_o. I mean as format is

object.EXECUTE(nconnID,cSQL,cResultcursor)

something like: thisform.oCDE.CursTip_o.EXECUTE( ... )

I am here confused about proper hierarchy ...
Répondre
Fil
Voir

Click here to load this message in the networking platform