Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GO to a negative recno in a optimistic table buffered cu
Message
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 6 SP5
Divers
Thread ID:
01031593
Message ID:
01031730
Vues:
7
>>In VFP6? I doubt about it. ;o)
>
>VFP8 SP1.
>
>However, I have some other problems. For instance
>
>UPDATE (lcAlias) set iPrimary_Flag=0 where iPrimary_flag = 1 doesn't seem to work 100% reliably when lcAlias is a view name. My colleague suggested to put
>UPDATE DBF(lcAlias)..., however, I found situations, where it doesn't work either saying the file (some temp name) doesn't exist.
>
>REPLACE FOR command also didn't work consistently...
>
>And right now we're wrestling with another page (Guarantor page), which really doesn't want to behave...

Why it not works? This works fine for me:
CLOSE DATABASES ALL
CREATE DATABASE Test
OPEN DATABASE Test
SET DATABASE TO Test
CREATE TABLE tTest (Bla C(10))
FOR asd = 1 TO 50
    INSERT INTO tTest VALUES (STR(asd))
NEXT
ALTER TABLE tTest ADD PRIMARY KEY Bla TAG Bla

CREATE SQL VIEW vTest AS SELECT Bla FROM tTest

DBSetProp("vTest","View","SendUpdates",.T.)
DBSetProp("vTest","View","BatchUpdateCount",1)
DBSetProp("vTest","View","CompareMemo",.T.)
DBSetProp("vTest","View","FetchAsNeeded",.F.)
DBSetProp("vTest","View","FetchMemo",.T.)
DBSetProp("vTest","View","FetchSize",-1)
DBSetProp("vTest","View","MaxRecords",-1)
DBSetProp("vTest","View","Prepared",.F.)
DBSetProp("vTest","View","UpdateType",1)
DBSetProp("vTest","View","UseMemoSize",255)
DBSetProp("vTest","View","Tables","eltest!results")
DBSetProp("vTest","View","WhereType",3)

DBSetProp("vTest.Bla","Field","DataType","C(10)")
DBSetProp("vTest.Bla","Field","UpdateName","Test!tTest.Bla")
DBSetProp("vTest.Bla","Field","KeyField",.T.)
DBSetProp("vTest.Bla","Field","Updatable",.T.)
CLOSE DATABASES ALL


whatBla = STR(25)
USE Test!vTest
BROWSE 
CURSORSETPROP("Buffering",5,'vTest')
lcAlias = "vTest"

UPDATE (lcAlias) SET Bla = STR(55) WHERE vTest.Bla = m.whatBla
GO 25
? TABLEUPDATE(1,.t.,lcAlias)
whatBla = STR(55)
UPDATE (lcAlias) SET Bla = STR(12) WHERE vTest.Bla = m.whatBla
GO 25
BROWSE 
CLOSE DATABASES ALL
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform