Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert not inserting no more
Message
De
22/08/2014 12:16:43
 
 
À
22/08/2014 09:46:23
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:
01606283
Vues:
104
I'm probably barking up the wrong tree on this, but here goes...

When you say "does not insert" do you mean that:
A. No new records are added in the FOR loop
or
B. Records are added, but the fields are blank.

Demo code --- only vaguely similar to what you'd posted:
SELECT 0
CREATE TABLE TableA FREE ( ;
    Col01   C(10), ;
    Col02   C(10), ;
    Col03   C(10), ;
    Col04   C(10) )
INSERT INTO TableA VALUES ("One","Two","Three","Four")

SELECT 0
CREATE TABLE TableB FREE ( ;
    Col01   C(10), ;
    Col02   C(10), ;
    Col03   C(10), ;
    Col04   C(10) )
INSERT INTO TableB VALUES ("Fee","Fie","Foe","Fum")

* Position the record pointer at EOF in TableA
GOTO BOTTOM IN TableB
SKIP IN TableB

SELECT TableA
? "Current table: ", ALIAS()
? "Col01 = ", Col01
? "Col02 = ", Col02
? "Col03 = ", Col03
? "Col04 = ", Col04

* GOTO 1 IN TableB    && **** THIS LINE ****

INSERT INTO TableB (Col01,Col02,Col03,Col04) VALUES (Col01,Col02,Col03,Col04)
INSERT INTO TableB (Col01,Col02,Col03,Col04) VALUES (Col01,Col02,Col03,Col04)
INSERT INTO TableB (Col01,Col02,Col03,Col04) VALUES (Col01,Col02,Col03,Col04)
INSERT INTO TableB (Col01,Col02,Col03,Col04) VALUES (Col01,Col02,Col03,Col04)

SELECT TableA
LIST

SELECT TableB
LIST
Notes
1. When the indicated line is commented out, you'll get blank records in TableB. If you uncomment, the records aren't blank.
2. Also notice the values that are populated in table when specified line is uncommented.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform