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

Take a look to FAQ#8153.

Also, you can *see* what exactly you require to set up in the properties of SPT cursor to make it updatable. Following is how you can see it:

- create temporary remote view based on the same query and with updating options that you require, using view designer and remote connection
- open that view
- look up and remember what are properties set by VFP using CursorGetProp() function :-)))
- clear view and connection from database

HTH.

>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')
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform