Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a base table with a Cursoradapter
Message
De
08/09/2008 18:51:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01345782
Message ID:
01345914
Vues:
16
I think there is a property to indicate if the cursor is Updateable. You need to check into that and set it to True.

>I think you need to set UpdateCmd and also check if there is a property like SendUpdates.
>
>I used Mark McCasland's CA Builder from Download section here and it automatically sets all the properties needed to make updates, inserts, deletes and selects.
>
>>Hello,
>>
>>I'm trying to get a cursoradapter class to work with a detail table in a form, and I need some clarification on what properties need to be set for an update to work. I'm using VFP tables, so the cursoradapter setup should be fairly simple. Here's what I've done so far:
>>
>>- In the business object's INIT() method, I place the following code:
>>
>>loca1 = CREATEOBJECT("CursorAdapter")
>>loca1.DataSourceType = "Native"
>>loca1.SelectCmd = "SELECT Leaseclause.* FROM leaseclause WHERE Leaseclause.clink = lease.lease AND Leaseclause.ndisplayorder = 9 ORDER BY Leaseclause.ndisplayorder"
>>loca1.alias = "v_leaseclause"
>>loca1.CursorFill()
>>
>>- When the form opens, the v_leaseclause alias is used as the datasource for a grid which successfully shows the multiple detail entries.
>>
>>- I would like to have any changes made in the grid immediately posted back to the base table whenever the user moves off of the current record. I've tried using =TABLEUPDATE(.T., .T., "v_leaseclause") in a save button, but the changes aren't posting back to the base table.
>>
>>I've left all of the default cursoradapter properties alone other than what is in the code above. What properties do I need to set to get the cursoradapter to issue an UPDATE to the base table?
>>
>>Thanks in advance,
>>
>>Ben
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform