Board index » delphi » Trubles with IBDataSet (Help me)

Trubles with IBDataSet (Help me)

On my for DBGrid (Columns: Item, Price, Discount), DataSource and IBDataSet
with:

1. SelectSQL = 'SELECT  Item_ID, Item, Price, Discount FROM Items';
2. InsertSQL = 'INSERT INTO Items (Item_ID, Spec_ID_Ref, Currency_ID_Ref,
Item, Price, Discount) VALUES (0, 0, 0, :ITEM, :PRICE, :DISCOUNT)';
3. ModifySQL = UPDATE Items SET Item = :ITEM, Price = :PRICE, Discount =
:DISCOUNT WHERE Item_Id = :OLD_ITEM_ID';

But, I got error during edit:
"SQL error code = -804
Incorrect values within SQLDA Structure"

Help me, please ...

With best regards,
Applechina (applech...@mail.ru)

 

Re:Trubles with IBDataSet (Help me)


Is Item_Id your Primary Key?  if so it probably shouldn't be included in
the insert statement.

In your Modify the where clause should be

WHERE Item_Id = :ITEM_ID';

not :OLD_ITEM_ID';

Quote
Applechina wrote:

> On my for DBGrid (Columns: Item, Price, Discount), DataSource and IBDataSet
> with:

> 1. SelectSQL = 'SELECT  Item_ID, Item, Price, Discount FROM Items';
> 2. InsertSQL = 'INSERT INTO Items (Item_ID, Spec_ID_Ref, Currency_ID_Ref,
> Item, Price, Discount) VALUES (0, 0, 0, :ITEM, :PRICE, :DISCOUNT)';
> 3. ModifySQL = UPDATE Items SET Item = :ITEM, Price = :PRICE, Discount =
> :DISCOUNT WHERE Item_Id = :OLD_ITEM_ID';

> But, I got error during edit:
> "SQL error code = -804
> Incorrect values within SQLDA Structure"

> Help me, please ...

> With best regards,
> Applechina (applech...@mail.ru)

Re:Trubles with IBDataSet (Help me)


The -804 error is fixed in the upcoming IBX update.  The plans are for later
this week for a public beta to be released.  Honest truth is that it is much
better than the D5 release, but is holding the beta tag because of a lot of the
IB 6.0 stuff in it (which won't be visible if you don't have IB 6.0 beta
installed).  This update will require that UP1 be applied and it will not run
against the unpatched version of Delphi.

Ravi will announce when it is available here (or I will).

Quote
alistair clethero wrote:

> AppleChina,

> are any of your fields of type NUMERIC with a scale and precision? If so,
> that's exactly the error i'm getting (and scratching my head over at the
> moment).

> cherz

> al

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)

Re:Trubles with IBDataSet (Help me)


AppleChina,

are any of your fields of type NUMERIC with a scale and precision? If so,
that's exactly the error i'm getting (and scratching my head over at the
moment).

cherz

al

Quote
Geoff Marshall wrote in message <38C2CCD3.63106...@dial.pipex.com>...
>Is Item_Id your Primary Key?  if so it probably shouldn't be included in
>the insert statement.

>In your Modify the where clause should be

>WHERE Item_Id = :ITEM_ID';

>not :OLD_ITEM_ID';

>Applechina wrote:

>> On my for DBGrid (Columns: Item, Price, Discount), DataSource and
IBDataSet
>> with:

>> 1. SelectSQL = 'SELECT  Item_ID, Item, Price, Discount FROM Items';
>> 2. InsertSQL = 'INSERT INTO Items (Item_ID, Spec_ID_Ref, Currency_ID_Ref,
>> Item, Price, Discount) VALUES (0, 0, 0, :ITEM, :PRICE, :DISCOUNT)';
>> 3. ModifySQL = UPDATE Items SET Item = :ITEM, Price = :PRICE, Discount =
>> :DISCOUNT WHERE Item_Id = :OLD_ITEM_ID';

>> But, I got error during edit:
>> "SQL error code = -804
>> Incorrect values within SQLDA Structure"

>> Help me, please ...

>> With best regards,
>> Applechina (applech...@mail.ru)

Re:Trubles with IBDataSet (Help me)


Jeff,

I hope this does not imply that IBX will only work against IB 6.0?  I am currently
using with IB 4 just fine and will move to IB 6 as soon as I can test my existing
code against it.

- Lou

Quote
"Jeff Overcash (TeamB)" wrote:
> The -804 error is fixed in the upcoming IBX update.  The plans are for later
> this week for a public beta to be released.  Honest truth is that it is much
> better than the D5 release, but is holding the beta tag because of a lot of the
> IB 6.0 stuff in it (which won't be visible if you don't have IB 6.0 beta
> installed).  This update will require that UP1 be applied and it will not run
> against the unpatched version of Delphi.

> Ravi will announce when it is available here (or I will).

> alistair clethero wrote:

> > AppleChina,

> > are any of your fields of type NUMERIC with a scale and precision? If so,
> > that's exactly the error i'm getting (and scratching my head over at the
> > moment).

> > cherz

> > al

> --
> Jeff Overcash (TeamB)
>       (Please do not email me directly unless  asked. Thank You)
> If there is somebody up there could they throw me down a line.  Just a
> little helping hand just a little understanding.  Just some answers to the
> questions that surround me now.  If there's somebody up there could
> they throw me down a line.               (Fish)

Re:Trubles with IBDataSet (Help me)


No it does not mean this.  It means there are special features only available
with IB6.0 like the ServiceAPI components.  Since versions of IB pre 6.0 don't
have this API it make no sense to install those components since you can't use
them against IB5.6 or earlier.

Quote
Luis Feliz wrote:

> Jeff,

> I hope this does not imply that IBX will only work against IB 6.0?  I am currently
> using with IB 4 just fine and will move to IB 6 as soon as I can test my existing
> code against it.

> - Lou

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)

Re:Trubles with IBDataSet (Help me)


Jeff Overcash (TeamB) <overc...@onramp.net> escreveu nas notcias de
mensagem:38C667AD.E8BA1...@onramp.net...

Quote
> No it does not mean this.  It means there are special features only
available
> with IB6.0 like the ServiceAPI components.  Since versions of IB pre 6.0
don't
> have this API it make no sense to install those components since you can't
use
> them against IB5.6 or earlier.

Will this IBX update available for both, professional and enterprise version
of Delphi?

Joao.

Re:Trubles with IBDataSet (Help me)


Yes, there is no difference between the IBX that ships with Pro and the one that
ships with Ent.

"Jo?o Cadilhe de Souza" wrote:

Quote
> Will this IBX update available for both, professional and enterprise version
> of Delphi?

> Joao.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)

Other Threads