Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto Increment not working with APPEND FROM
Message
De
16/04/2003 14:56:44
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Auto Increment not working with APPEND FROM
Divers
Thread ID:
00778519
Message ID:
00778519
Vues:
68
Hello,

I'm working with the released VFP8 and notice that AutoInc fields do not receive values if I append from another file - they get zeros. For example, if I create a simple table with an AutoInc, FName, LName, and append from a text file with first/last name, the autoinc field stays 0.

Here is a simple example:

1) Create the table (rename if this collides with another table)
2) Append blank (autoinc populates)
3) Create the simple text file (cut/paste from this message)
4) Append this small list of names with a FIELDS list excluding autoinc
5) Autoinc fields are zeroed

Any ideas? Thanks,

Franz Nisswandt

----------------------
CREATE TABLE 'AUTOTEST.DBF' ( ;
AUTOTESTID I NOT NULL AUTOINC NEXTVALUE 3 STEP 1, ;
FNAME C(15) NULL, ;
LNAME C(25) NULL)

APPEND BLANK && AUTOINC GETS POPULATED
REPLACE LNAME WITH 'SMITH', FNAME WITH 'JOHN'

* AUTOINC FIELD IS POPULATED IF APPEND BLANK or APPEND
*
*
* Now, create a text file called AUTOTEST.TXT
* with some names:

"JOHN","SMITH"
"JOE","SMITH"
"JILL","SMITH"
"JENNY","SMITH"
"JIM","SMITH"
"JAMES","SMITH"
"JON","SMITH"

* Now try to APPEND these names as follows:

APPEND FROM AUTOTEST DELI FIELDS FNAME,LNAME

* Note how the AutoInc fields are ZEROs
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform