Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update conflict
Message
De
18/11/2010 09:50:54
 
 
À
18/11/2010 09:19:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01489567
Message ID:
01489578
Vues:
45
It may not be related, but instead of Calculate, I would use a SQL Select statement instead, since it doesn't move the record pointer.
IF !EOF('inspdata') AND !BOF('inspdata')
   local lnjobnum
   lnJobnum=inspheader.jobnum
   Select max(itemnum) from inspdata where jobnum==lnJobnum into array lnMaxItem
   RETURN lnMaxItem
ELSE
   Return 0
endif
>I seem to be having a new issue with one of my applications.
>
>An error is being returned, Update Conflict zgetmaxitem line 4 data source inspdata.
>
>inspdata is a table in a database that is part of a form's DE. Shared, not exclusive.
>
>The zgetmaxitem is a procedure I have defined in the form.
>
>as follows;
>
>
>IF !EOF('inspdata') AND !BOF('inspdata')
>	LOCAL lnRecNo
>	lnRecNo=RECNO('inspdata')
>	CALCULATE MAX(inspdata.itemnum) FOR inspdata.jobnum=(inspheader.jobnum) TO lnMaxItem && == is not necessary with numbser!
>	IF lnRecNo>0
>		GO lnRecNo IN 'inspdata'
>	endif	
>	RETURN lnMaxItem
>ELSE
>	RETURN 0
>endif
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform