Information générale
Titre:
Auto Increment not working with APPEND FROM
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement