Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with CursorSetProp -SQL SERVER communication
Message
From
21/10/2002 09:38:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problem with CursorSetProp -SQL SERVER communication
Miscellaneous
Thread ID:
00713476
Message ID:
00713476
Views:
47
Hello all

I am trying to delete some records (on SQL server) using SPT

cSQL = "select * from fvalues"
lsuccess=SQLEXEC(nConnHandle, cSQL, 'TEMP')

********** make the cursor TEMP updatable

cKeyField = "TAG_P,TAG_M,TAG_L,TAG_F" && MY UNIQNESS
cRemoteTable = 'fvalues'

=CursorSetProp("KeyFieldList", cKeyField )
=CursorSetProp("WhereType", 1)
=CursorSetProp("Tables", cRemoteTable)
=CursorSetProp("SendUpdate", .T.)

.....
=CursorSetProp("UpdateNameList", lcField)
......
=CursorSetProp("UpdatableFieldList", lcField)
.....



Then I am trying to delete some records as follow :
*****************************************************



SELECT TEMP
DELETE ALL FOR TAG_P < 10 &&which i have doublicated values

x=TABLEUPDATE(.T.,.F.)

IF x=.f.
MESSAGEBOX('problem updating')
=TABLEREVERT(.T.)
RETURN
endif



the update cannot be done because there are doublications in the KeyFieldList.

Is this the correct way to setup the KeyFieldList of multible keys ?

cKeyField = "TAG_P,TAG_M,TAG_L,TAG_F" && MY UNIQNESS
=CursorSetProp("KeyFieldList", cKeyField )


Thanks in advance
Petros


Note : With SPT is working fine

lsuccess=SQLEXEC(nConnHandle, 'DELETE FROM FVALUES WHERE TAG_P < 10')
Next
Reply
Map
View

Click here to load this message in the networking platform