Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with SQL Uniqueidentifier column and Remote views
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problems with SQL Uniqueidentifier column and Remote views
Miscellaneous
Thread ID:
01124968
Message ID:
01124968
Views:
45
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
Next
Reply
Map
View

Click here to load this message in the networking platform