V4RB - UPDATE-Problem

Claudius Sailer Claudius at sailer-online.de
Thu Feb 10 16:12:35 CST 2005


Hi Ruslan,

Am 09. Feb 2005 um 20:22 Uhr schrieb Ruslan Zasukhin:

>     curs = SqlSelect "SELECT ... WHERE ... "
>
>     f1 = curs.field("f1")
>     f2 = curs.field("f2")
>
>     do
>         f1 = f2
>         curs.UpdateRecord
>
>     while curs.nextRecord
>
>     db.Flush()

I had to change a little bit:

   Dim count as integer
   Dim CUR as VCursor
   Dim Betrag, BetragHerk, BetragZiel as VField

   //Felder bei Buchungen hinzufuegen
   cmd="ALTER TABLE Buchungen ADD BetragHerk LONG NOT NULL"
   count=tmpDB.SQLExecute(cmd)

   cmd="ALTER TABLE Buchungen ADD BetragZiel LONG NOT NULL"
   count=tmpDB.SQLExecute(cmd)

   cmd="SELECT Betrag, BetragHerk, BetragZiel from Buchungen"
   CUR = tmpDB.SqlSelect(cmd, kV_Server, kV_NoLocks, kV_Random)

   Betrag = CUR.field("Betrag")
   BetragHerk = CUR.field("BetragHerk")
   BetragZiel = CUR.field("BetragZiel")

   res=CUR.FirstRecord

   do
     BetragHerk = Betrag
     BetragZiel = Betrag

     res=CUR.Update

   loop until NOT CUR.nextRecord

   tmpDB.Flush

BUT it doesn't work. Betrag is always nice value and BetragHerk and 
BetragZiel is also changed, but it isn't rwitten to database. :-((

bye


Claudius

-- 
G4/733 QS / MacOS X 10.3.7de / RB 5.5.3de/ Valentina 1.10.0
Homepage	http://www.ClaSai.de
iChat		ryhoruk
RealBasic ListBoxes: [ I feel the need...the need for speed!!! ]



More information about the Valentina mailing list