Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updateable Cursor - how?
Message
De
24/09/1999 16:52:01
 
 
À
24/09/1999 14:27:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00268624
Message ID:
00268788
Vues:
18
Cursors that are created by the INTO clause of a SELECT command are by default not updateable. In order to make them updatable you can:

USE DBF('nameofcursor') AGAIN in 0 ALIAS someothername

then make the changes to that work area.

The updatability that you are referring to in you question has to do with making changes to a view cursor and having those changes reflected back in the underlying (original) tables.

>Well I used CURSORSETPROP("Buffering", 5, "myCursor") and it still won't let me update it.
>
>What I'm trying to do is insert data into dummy fields I built into a previous query. Like this:
>
>SELECT table1.field1, table2.field2, 000000 AS dummy1, 000000 AS dummy2;
>FROM table1, table2;
>WHERE ..More SQL Stuff...
>INTO CURSOR myCursor
>
>In order to calculate the data I need I have to run a second SELECT, I'm working on a union solution but haven't been able to get it right yet, this is my work around.
>
>After I run the second SELECT I just want to update/replace the data in the dummy values in myCursor. I keep getting "Can't update the cursor" with or without the CURSORSETPROP settings.
>
>/Chris
>
>
>>First create the cursor as usual.
>>
>>Then look at the help for CURSORSETPROP. You can pass several parameters, but the first parameter is the property of the cursor you want to set. You will need to set several properties including Tables (the tables you will be updating), UpdatableFieldList (the fields that you want to be able to update), KeyFieldList (which fields are key values so the update can find the right record to update), UpdateType, and WhereType. There may be some other options you want to set, but I think this is the core set. Basically it sets the same properties that you would set visually when you design a View.
>>
>>Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform