Hi all,
I have a SQL SERVER Table with PK column defined as Uniqueidentifier
[CustomerID] uniqueidentifier ROWGUIDCOL NOT NULL ,
CONSTRAINT [DF_TR_TRAN_tr_id] DEFAULT (newid()) FOR [CustomerID],
(Name:CustomerId RowGuid = Yes, Default value = Newid())
The problem starts when I try to update the above table using SQL Pass-through from Foxpro.
I have set up the cursor as follows:
CURSORSETPROP("FetchMemo", .T.)
CURSORSETPROP("Tables", "Customers")
CURSORSETPROP("UpdatableFieldList", "Col1, Col2... )
CURSORSETPROP("UpdateNameList", "Col1 Customers.Col1, Col2... )
CURSORSETPROP("KeyFieldList","CustomerId")
CURSORSETPROP("WhereType", 3)
CURSORSETPROP("SendUpdates", .T.)
If I exclude the "CustomerId" column from the
"UpdatableFieldList" and "UpdateNameList" properties of the cursor,
- INSERT works ok,
- UPDATE and DELETE are throwing the following error :
"No key columns specified for the update table "name".
Use the KeyFieldList property of the cursor"
(Please note that KeyFieldList property of the cursor has been set corectly.)
When I add the "CustomerId" column to the "UpdatableFieldList" and "UpdateNameList"
- UPDATE and DELETE work fine,
- INSERT repors the error :"Invalid character value for CAST specification"
I guess I can't have it both ways.
Any ideas? Any help highly appreciated!
Regards,
Zoran