Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tablename as parameter ??
Message
 
 
À
31/03/2003 01:45:26
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00771831
Message ID:
00771952
Vues:
16
Hi Albert,

What VFP version are you using? The code I provided will work in VFP7 and later. In previos versions it'll require litle bit more code.
LOCAL lcSql
lcSql = [SELECT count(*) as present from ] + p_table + [ where ] + p_field + [ = ?p_data]
l_result = SQLEXEC(p_connection, lcSql)
>Hello Sergey !
>I tried your example with no success ??
>Just to stupid ??? Just missing some basics ????
>valid event of field in form
>***********************************
>p_data = alltrim(this.value)
>p_table = "t_adressen"
>p_field = "name1"
>if p_cancel = .F.  && no mouseclick on abort button so do the valid !!
>return (p_exists(p_table,p_field,p_data))
>endif
>*********************************************
>
>in my functions.prg i have it like this
>
>function p_exists
>parameters p_table,p_field,p_data
c>if present = 0
>return 1
>else
>return 0
>endif
>
>endfunc
>
>There is an error at l_result = SQLEXEC(p_connection, lcSql)
>invalid value,type or number of arguments
>I think i missunderstood <>, <>
>
>Please help
>
>Best regards
>Albert
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform