Board index » delphi » IBSQL - how to set up parameters?

IBSQL - how to set up parameters?

Hello,  all!

Please, help, how can i set parameters for query like this:

IBSQL->SQL->Clear();
IBSQL->SQL->Add("insert into occupancies values
(:OCCUPANCY_ID,:OCCUPANCY_PARENT_ID,:OCCUPANCY_NAME,0)");

when working with IBQuery, i've used syntax like this:

IBQuery->ParamByName("OCCUPANCY_ID")->AsInteger=CDATA->OCCUPANCY_ID;

---
Bob Zatolokin                  mailto: litt...@ogl.ru

 

Re:IBSQL - how to set up parameters?


Quote

> Hello,  all!

> Please, help, how can i set parameters for query like this:

> IBSQL->SQL->Clear();
> IBSQL->SQL->Add("insert into occupancies values
> (:OCCUPANCY_ID,:OCCUPANCY_PARENT_ID,:OCCUPANCY_NAME,0)");

> when working with IBQuery, i've used syntax like this:

> IBQuery->ParamByName("OCCUPANCY_ID")->AsInteger=CDATA->OCCUPANCY_ID;

Since 4.5 you can use the exact same syntax.  Pre 4.5 you have to do
Params.ByName.

Quote
> ---
> Bob Zatolokin                  mailto: litt...@ogl.ru

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads