Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert not inserting no more
Message
De
23/08/2014 10:22:41
 
 
À
22/08/2014 10:52:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01606233
Message ID:
01606300
Vues:
72
I'm sorry but french is my native language. What do you mean by humor you?

>Just humor us, Denis. What's the first _TALLY when the INSERT outside the SCAN but inside the FOR does not fire?
>
>
>SELECT ... INTO CURSOR cEmp1Temp READWRITE 
>
>MESSAGEBOX(TRANSFORM(_TALLY))
>
>
>>>You do need to provide some code Denis.
>>
>>Here is some code.
>>
>>
>>CREATE CURSOR cÉtap1 (Séquence n(3), DescServ C(50), CléPrimaire I)
>>
>>* Here some code I didn't include. It will put records in the cursor cÉtap1
>>
>>CREATE CURSOR ;
>>	cRapp ( Entete1 c(50),  Entete2  c(50),  Entete3  c(50), Entete4  c(50),;
>>        
>>        * And a bunch of other fields.
>>)
>>
>>SELECT Séquence, DescServ, CléPrimaire ;
>>FROM cÉtap1 ;
>>ORDER BY DescServ ;
>>INTO CURSOR cSuiviServ READWRITE 
>>
>>SELECT ... INTO CURSOR cEmp1Temp READWRITE 
>>
>>IF _tally = 0
>>	DO FORM ts_messagebox WITH I('Pas de données à imprimer.')
>>ELSE
>>	nTotLigne = 0
>>	SCAN  	
>>		nTotLigne = nTotLigne + 1
>>
>>		INSERT INTO cRapp ( NomServ1) VALUES ("")
>>		
>>		SELECT cSuiviServ
>>		nI = 0
>>		SCAN
>>			ni = nI + 1
>>			cNi = ALLTRIM( STR( ni))
>>			cReplace = "Replace NomServ" + cNi + " with cSuiviServ.DescServ in 'cRapp'"
>>			&cReplace 	
>>		ENDSCAN 
>>
>>		replace Entete1 WITH cEntete1 IN "cRapp"
>>		replace Entete2 WITH cEntete2 IN "cRapp"
>>		replace Entete3 WITH cEntete3 IN "cRapp"
>>		replace Entete4 WITH cEntete4 IN "cRapp"
>>		
>>		replace date WITH cEmp1Temp.DateRv IN "cRapp"
>>		Replace NomProf WITH I("Professeur") + ": " + ALLTRIM( cEmp1Temp.NomProf) IN "cRapp"
>>		replace Heur WITH cEmp1Temp.HeurDebu IN "cRapp"
>>		replace NomClient WITH cEmp1Temp.NomClient IN "cRapp"
>>		replace Tél WITH cEmp1Temp.Téléphone IN "cRapp"
>>
>>		nPos = cEmp1Temp.Séquence
>>		cReplace = "replace LignServChoisiPos" + ALLTRIM( STR( nPos)) +;
>>			" with 'X' in 'cRapp'"	
>>		&cReplace		
>>			
>>		SELECT cEmp1Temp
>>	ENDSCAN 
>>	
>>	FOR nI = nTotLigne TO 25
>>
>>***
>>*** This is the insert that doesn't insert
>>***
>>		INSERT INTO cRapp ;
>>			(;
>>			Entete1,;
>>			Entete2,;
>>			Entete3,;
>>			Entete4;
>>			);
>>			VALUES ;
>>			(;
>>			cEntete1,;
>>			cEntete2,;
>>			cEntete3,;
>>			cEntete4;
>>			)
>>	ENDFOR 
>>
>>        * Here again I didn't copy the code because anyway the insert didn't succeed.
>>
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform