V4RB2: funny Database entries

Ruslan Zasukhin sunshine at public.kherson.ua
Sun May 20 09:11:09 CDT 2007


On 5/19/07 9:28 PM, "Claudius Sailer" <Claudius at sailer-online.de> wrote:

Hi Claudius,

> what I wonder is, that
> 
> name = "DBBuchungen"
> BDatum = new VDate("BDatum", EVFlag.fIndexed)
> Herk_Konto = new VObjectPtr
> ("Herk_Konto",inDataBase.TKonten,EVOnDelete.kRestrict+EVFlag.fIndexed)
> Ziel_Konto = new VObjectPtr
> ("Ziel_Konto",inDataBase.TKonten,EVOnDelete.kRestrict+EVFlag.fIndexed)
> Kategorie_ID = new VobjectPtr("Kategorie_ID",
> inDataBase.TKategorien,EVOnDelete.kRestrict+EVFlag.fIndexed)
> Betrag = new VLong("Betrag")
> Kommentar = new VVarChar("Kommentar",504,EVFlag.fNullable)
> Blocked = new VBoolean("Blocked", EVFlag.fIndexed)
> Deleted=new VBoolean("Deleted", EVFlag.fIndexed)
> 
> 
> you can see in table description that Herk_Konto, Ziel_Konto,
> Kategorie_ID can't be 0 becuase in the referenced tables 0 is not a
> valid value!!!

ObjectPtr filed can have zero value.
Why it cannot be ?

> this is code for writing into database. I know my fault.
> AktuelleKategorie, AktuellesKonto and AktuellesGegenKonto are '' but
> I would expected the addRecord would fail!!
> 
>    meineDatenbank.TBuchungen.setblank
> 
>    Call parsedate(EditField1.text.trim,CheckDate)
> 
>    ''meineDatenbank.TBuchungen.BDatum.Set(CheckDate.year,
> CheckDate.month, CheckDate.day)
>    meineDatenbank.TBuchungen.BDatum.SetDate(CheckDate)
> 
>    meineDatenbank.TBuchungen.Kategorie_ID.value=AktuelleKategorie
> 
>    if EditField4(0).text.cdbl<>0 then
>      //Ausgabe
>      meineDatenbank.TBuchungen.Betrag.value=RoundTextNumber(EditField4
> (0).text)
>      meineDatenbank.TBuchungen.Herk_Konto.value=AktuellesKonto

I have not catch about ''


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list