Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating Cursors
Message
From
13/05/2001 18:36:15
 
 
To
11/05/2001 15:43:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00506375
Message ID:
00506686
Views:
17
>I have sent out a few messages about updating cursors, using the
>CURSORSETPROP(). I want to have the cursor update when I use TABLEUPDATE(), but this never workes. It always returns .F.
> I got a lot of feed back on the cursor propertie settings, most of which I was already using.
> I set MULTILOCKS ON, get my cursor and set the CURSORSETPROP properties as follows:
>
>
>lnConn = SQLCONN("novtrans","sa","")
>lnExec = SQLEXEC(lnConn,"select * from testdata ",testdata)
>
>SET MULTILOCKS ON
>=CURSORSETPROP("Tables", [dbo."testdata"])
>=CURSORSETPROP("buffering",5)
>=CURSORSETPROP("UpdateNameList", [FNAME dbo."FNAME", LNAME dbo."LNAME"] )
>=CURSORSETPROP("KeyFieldList", "FNAME" )
>=CURSORSETPROP("UpdatableFieldList", "FNAME,LNAME,DESCRIPTION" )
>=CURSORSETPROP("SendUpdates", .t.)
>
>REPLACE fname WITH "anyname"
>TABLEUPDATE()
>
>
>This does not work, it returns .F.
>Also, I would like to be able to insert a record. This also will not work.
>
>Now mind you I am not using a DBC, this is a cursor created through a passthrough.
>
>QUESTION:
>Can you make a cursor updatable? or only a view through the DBC?
>
>I can do the updates through a passthrough, but I thought this could be done. If not I will stick to the passthrough.
>
>Maybe one of you can recreate this test table on your SQL server and try this update. If it works send me the settings.
>
>The table fields are:
>fname c(#)
>lname c(#)
>description(#)
>It only containes on record. Try it and see what you come up with!!!
>
>Once again, is a stand alone cursor updateable or can you only make it updatable through the DBC connection?
>
>HOPE to hear from you soon!!!

It's updateable, I use the same approach myself and it works fine.
I've had some proplems with PK issues and such, but as whole it's a sound enough technique.
I'll try you sample tomorrow, and send you some more feedback along with some code.

You may want to test for success in between all those CURSORSETPROP's.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform