Subject | Re: [IBO] Cannot edit current row error |
---|---|
Author | Luiz Alves |
Post date | 2002-01-14T21:50:48Z |
Steve,
How is configured RequestLive property?
If RequestLive=False set it to True or you could add For Update clause in
your query.
With your query, you don't need set EditSql. IBO take care it for you.
Luiz.
How is configured RequestLive property?
If RequestLive=False set it to True or you could add For Update clause in
your query.
With your query, you don't need set EditSql. IBO take care it for you.
Luiz.
----- Original Message -----
From: "sdbeames" <s.beames@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, January 14, 2002 7:39 PM
Subject: [IBO] Cannot edit current row error
> Hi all,
> I need some help please. I'm using V4.2.Fn with BCB5.
> One of my forms has a button handler that includes the following code.
> The marked line causes a "Cannot Edit current Row" error! All the
> other lines work fine when it's commented out!
>
> JobsQry->Insert();
> JobsQry->FieldByName("CLIENTNO")->AsInteger = nClientNo;
> JobsQry->FieldByName("ACCNT_ID")->AsInteger = nAccntId;
> JobsQry->FieldByName("PERCENTAGE")->AsInteger = nPercent; /<-******
> JobsQry->FieldByName("AMOUNT")->AsFloat = fAmount;
> JobsQry->FieldByName("REQUESTED")->AsDate = sRequested;
> JobsQry->FieldByName("REQUIRED")->AsDate = sRequired;
> JobsQry->FieldByName("DESCRIPTION")->AsString = sDescription;
> JobsQry->Post();
>
> The JOBS table has no triggers, and the definitions:
> CREATE DOMAIN D_PERCENT AS SMALLINT;
> PERCENTAGE D_PERCENT,
>
> and JobsQry has SQL like:
> SELECT J.JOBNO
> , J.CLIENTNO
> ~SNIP~
> , J.PERCENTAGE
> ~SNIP~
> , J.DEPT
> FROM JOBS J
> JOIN ACCOUNTS A ON A.ACCNT_ID=J.ACCNT_ID
> WHERE J.DEPT=USER
>
> and an EditSQL like:
> UPDATE JOBS SET
> ~SNIP~
> CLIENTNO = :CLIENTNO,
> ACCNT_ID = :ACCNT_ID,
> PERCENTAGE = :PERCENTAGE,
> ~SNIP~
> WHERE
> JOBNO = :OLD_JOBNO
>
> KeyLinks = JOBNO, (the PK)
> ReadOnly is false,
> No ColumnAttributes are set for PERCENTAGE,
> Field Properties for JOBS.PERCENTAGE are Alignment:CENTER, Default
> Value:100, Display Format:0%.
>
> I'm running out of ideas.........any suggestions on where to look
> next?
> Thanks,
> Steve