Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fieldvalid-only first time fires
Message
From
17/01/2006 08:02:12
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
CodeMine
Title:
Fieldvalid-only first time fires
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Oracle
Miscellaneous
Thread ID:
01087465
Message ID:
01087465
Views:
54
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 ...
Reply
Map
View

Click here to load this message in the networking platform