Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server 2008 table as a record source
Message
De
19/02/2016 05:21:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
19/02/2016 04:37:00
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:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01620689
Message ID:
01631718
Vues:
47
>>>Even for the UC of different WhereFilters in SelectCmd needed, I probably would try if a special CA could handle the safe select gymnastics with a few lines of code to keep data layer on one mechanism ;-))
>>
>>I'm still investigating... the source of my problems may be the weird behavior in cases when there are two adapters on the same base table, and one of them gets requeried (by either .cursorRefresh(), requery() or refresh()) - first time it may work, second time it seems the cursor of the other one gets closed. Or something like that, still haven't gathered all the evidence.
>
>We have at least one app with some tables where up to slightly more than half a dozen ca query into one table and CursorRefresh() depending on user input - mostly as rowsources for dynamically filled dropdown lists depending on other parts of the program. Do not remember that something special needed to be done, but was using fwk classes - possible some magic was done there, but I doubt it. RO access, but I doubt that could be your problem.

For readonly there was no problem here either - it's when they're all updatable and have sent some updates to the server.
The scenario I have is that one CA creates the record, the next bizobject adds a few records into a child table and then writes the FK to it into the 2nd CA on the same table as the first one. Then a third CA on the same table is fired and just retrieves the same record. At that point, it misbehaves. Mostly (depending on what I do) it thinks that it got a record inserted into the cursor (even though that record is retrieved from the server) and does an automatic tableupdate() which generates an insert statement being sent to the SQL right away.

I got it to work correctly by using .cursorFill() with a new statement. Will need some time to try Fabio's trick with .cursorRefresh(lcModifiedSelectCommand).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform