|Subject||RE: [IBO] TIBOQuery insert with parameters|
> I have a simple query as below which has a PK "LOC_ID" and a mandatoryWhere you have the input variable with the "var_" prefix there is no way
> field "PVERSION_ID" which is an FK.
> FROM LOC
> WHERE PVERSION_ID = :var_PVERSION_ID
> I need the value for :var_PVERSION_ID to be automatically put into
> PVERSION_ID during an insert. Here is the insert code:
> INSERT INTO LOC(
> LOC_ID, /*PK*/
> VALUES (
> Should this work OK when I test it by manually preparing it, then
> entering a parameter, opening the returned records in the TIBO
> component and inserting a row manually?
> I thought I had this working before, but now it doesn't seem to. Can't
> figure out why. I keep getting an error that PVERSION_ID must have a
> Any help would be appreciated.
that IBO would automatically assume what you are wanting it to.
I suggest you use the OnNewRecord event to plug in the value that you want.
MyField_PVERSION_ID.AsString := MyParam_var_PVERSION_ID.AsString;