Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field valid - works only first time
Message
 
 
À
16/01/2006 09:24:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Oracle
Divers
Thread ID:
01087131
Message ID:
01087467
Vues:
11
How Oracle table Tip_o could be a controlsource for the textbox?
You can use Debugger to step through the code and see why it fails.

>This code is in field validate 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 exists. After that duplicate values are not signalized till commit in database.
>(ORA - ...... ). I also modified code and move it in next control Gotfocus event but with
>the same result. Any help appreciated.
>
>*
>LOCAL s, v, _tip
>*
>_tip = ''
>s = 0
>*
>_tip  = thisform.txtTip.value
>*
>IF thisform.IsNew('Tip_o')
>   IF !empty(thisform.txtTip.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
>      *
>   ENDIF
>*
>ENDIF
>
>
>Regards, Gojko
>
>PS
>(BTW: How do you earn code rows to be on light blue background and intended ?)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform