General information
Category:
Visual FoxPro Beta
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only