V4RB2 Insert instead of UPDATE

Claudius Sailer Claudius at sailer-online.de
Sat Apr 2 18:43:46 CST 2005


Am 02. Apr 2005 um 12:52 Uhr schrieb Claudius Sailer:

>
> Am 02. Apr 2005 um 11:44 Uhr schrieb Ruslan Zasukhin:
>
>> On 4/2/05 11:59 AM, "Claudius Sailer" <Claudius at sailer-online.de> 
>> wrote:
>>
>>>    if CheckLeer(EditField5.text) then
>>>      meineDatenbank.TBuchungen.Kommentar.setblank
>>>    else
>>>      meineDatenbank.TBuchungen.Kommentar.Value=EditField5.text.trim
>>>    end if
>>>    meineDatenbank.TBuchungen.Blocked.value=false
>>>    meineDatenbank.TBuchungen.UpdateRecord()
>>>
>>>    meineDatenbank.TBuchungen.flush
>>
>> Note, sure, but why setBlank here ?
>
> then it gets NULL otherwise it gets ""

you can see Bug 624.
Bug is in other SQL where RecID is not by the correct Record in Cursor. 
So I Update and mark as deleted wrong records.

SELECT B.RecID, B.BDatum, KZ.Konto_Name, K.Kategorie_Name, B.Betrag, 
null, B.Kommentar, B.Blocked
FROM Buchungen B, Kategorien K, Konten KZ
WHERE B.Kategorie_ID=K.RecID
AND (B.Ziel_Konto=KZ.RecID AND B.Herk_Konto='15')
AND B.Deleted='0'
UNION
SELECT B.RecID, B.BDatum, KZ.Konto_Name, K.Kategorie_Name, null, 
B.Betrag, B.Kommentar, B.Blocked
FROM Buchungen B, Kategorien K, Konten KZ
WHERE B.Kategorie_ID=K.RecID
AND (B.Herk_Konto=KZ.RecID AND B.Ziel_Konto='15')
AND B.Deleted='0'
ORDER BY B.BDatum, KZ.Konto_Name, K.Kategorie_Name

bye


Claudius

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



More information about the Valentina mailing list