Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert not inserting no more
Message
De
22/08/2014 05:13:00
 
 
À
21/08/2014 21:47:15
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:
01606246
Vues:
80
Denis, I think you should really provide some code here... Does not need to be your exact code, but at least one that can reproduce the outcome.

I tried to follow the description of your scenario:
CREATE CURSOR curTable (someField I)
INSERT INTO curTable VALUES (1)
INSERT INTO curTable VALUES (2)
INSERT INTO curTable VALUES (3)

CREATE CURSOR curReport (toPrint I)

SELECT curTable
SCAN
	INSERT INTO curReport VALUES (curTable.someField)
ENDSCAN

INSERT INTO curReport VALUES (curTable.someField)
Does this represents what you are doing or am I missing any piece?

>>>Hello all,
>>>
>>>I am building a cursor for a report. I scan all the data from a given table. For each of those records I scan I insert a record in a new cursor that will be used for the report.
>>>
>>>When the scan is finished I want to insert other records in that created cursor. The problem is that the insert is not inserting after the Scan...EndScan sequence.
>>>
>>>This is really weird.
>>>
>>>I use the same insert after the SCAN that I used in the SCAN.
>>>
>>>I really don't get it.
>>>
>>>Heeeeelp!
>>
>>Are you debugging this problem? Can you show some code? May be the condition to run that code is false.
>
>Hello Naomi,
>
>That's what makes this so weird. I ran this through the debugger and no record is added after the insert instruction is given. I don't see how showing some code would help you. I'm telling that because it's the same insert I did in the scan loop.
>
>Insert inside the scan works
>
>Insert outside the scan doesn't.
>
>Sooooo weird.
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform