Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with CursorSetProp -SQL SERVER communication
Message
De
21/10/2002 09:38:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Problem with CursorSetProp -SQL SERVER communication
Divers
Thread ID:
00713476
Message ID:
00713476
Vues:
48
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')
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform