Information générale
Catégorie:
Visual FoxPro Beta
Versions des environnements
This is the syntax I used to create the table:
CREATE TABLE BASI.PRESIDENTS(KeyID INT NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,LoginID CHAR(8), ...
DB2 does the Key generation, I can't tell you much more than that. In VFP8 I use "SELECT IDENTITY_VAL_LOCAL() as NewIDValue FROM SYSIBM.SYSDUMMY1" To return a cursor with the last Key generated.
>CCMD is just a place holder for PK field name. I ran into this when trying to figure out how to get this to work in Oracle. How are you generating PKs in DB2?
>
>>I changed the connection to work off Native and that appeared to work.
>>
>>I then tried it with DB2 (ODBC) and I get a new error.
>>
>>I am able to connect and insert a record. When I issue a Tableupdate() it returns false but a record is added to the DB2 table. The cursor does update the KeyID field but it always updates to the value 1.
>>
>>The error I get is: "The refresh key defined for table CCMD is not unique."
>>I have no idea where it got the table "CCMD", I can not find it in code anywhere.
Précédent
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