Re: Bug with ADORecordSet.Update

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Keith Gray" <keith(at)heart(dot)com(dot)au>, "ODBC" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Bug with ADORecordSet.Update
Date: 2001-09-28 15:34:38
Message-ID: EKEJJICOHDIEMGPNIFIJCEJNFHAA.Inoue@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> -----Original Message-----
> From: Keith Gray
>
> The "bug" is when I update the table
> (described below) all fields with a common "OwnerID" get updated
> simultaneously. OwnerID is used to cascade Ledger sub accounts.
>
> CREATE TABLE GeneralLedger (
> AccountSequence integer,
> AccountLevel integer,
> AccountFunction integer,
> Movement varchar(1),
> Postings varchar(1),
> AccountCode varchar(10),
> OwnerID integer,
> Description varchar(255),
> OBalPer0 float,
> PBalPer0 float,
> CBalPer0 float,
> OBalPer1 float,
> PBalPer1 float,
> CBalPer1 float,
> OBalPer2 float,
> PBalPer2 float,
> CBalPer2 float,
> OBalPer3 float,
> PBalPer3 float,
> CBalPer3 float
> )
>
> ...in VB
>
>
> Do While mLevel <> 2
> SQL = "SELECT CBalPer0, PBalPer0, OwnerID FROM GeneralLedger " & _
> "WHERE AccountSequence=" & Cstr(mLevel)
> Set Rec = OpenDynamic(SQL)
> mLevel = Rec!OwnerID
> Rec!PBalPer0 = Rec!PBalPer0 + Amount
> Rec!cBalPer0 = Rec!cBalPer0 + Amount
> Rec.Update
> Loop
> End Sub
>
> ...for now I fixed this by
>
> "SELECT * FROM GeneralLedger WHERE AccountSequence=" & Cstr(mLevel)
>
> Is this a known bug?
> Is it caused by no cursor control?

Maybe.
You seem to have to specify items so that they distiguish individual rows.

regards,
Hiroshi Inoue

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2001-10-01 00:11:36 Re: int4eq (xid, int4)
Previous Message Hiroshi Inoue 2001-09-28 00:56:22 Re: v7.01.00.07 driver fails to properly report BOOL values