Subject | Re: [IBO] TIBOQuery Problem ? |
---|---|
Author | Hans |
Post date | 2005-06-09T05:53:03Z |
Just expected every :parameter to be accessable :)
----- Original Message -----
From: "Lester Caine" <lester@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, June 08, 2005 11:23 PM
Subject: Re: [IBO] TIBOQuery Problem ?
> Hans wrote:
>
>> Hello Jason,
>>
>> TIBOQuery .. Version 4.5B
>>
>> qryGeneral2->Close();
>>
>> qryGeneral2->SQL->Text = "update period_value_daily r set sale = sale -
>> :sale, on_hand = on_hand + :quantity, qty_sold_out = qty_sold_out -
>> :quantity ";
>>
>> qryGeneral2->SQL->Text += ",cost_of_sale = cost_of_sale - ( :avgcost *
>> :quantity ) ";
>> qryGeneral2->SQL->Text +="where trackingdate = :saledate and item_code =
>> :itemcode";
>> qryGeneral2->Prepare();
>>
>> for (int i = 0;i < dtm_Sales->qryGeneral2->ParamCount; i++)
>> ShowMessage(String(i) + " - " +
>> dtm_Sales->qryGeneral2->Params->Items[i]->Name);
>>
>> Results only in
>> 0 - sale
>> 1 - quantity
>>
>> and no more
>>
>> salesdate, avgcost and itemcode are not part of the Params
>
> Just a couple of quick questions ( I'm on my way out to site :( )
> If you change the second :quantity to :qx, do you get all + qx?
> If you access
> dtm_Sales->qryGeneral2->ParamByName("itemcode")
> (May not be format)
> Does it give an error?
> What is given if you put the text of your update directly into IB_SQL?
> Just a few things to check as I don't have time to look at present, and
> it may give you a workround or point better to the bug!
>
> --
> Lester Caine
> -----------------------------
> L.S.Caine Electronic Services
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>
>
>
>