Subject Re: [IBO] Problems using IB_Query and IBOQuery
Author Woody
From: "aztoquetti" <armandozt@...>
>
> For example, if I have an EditBox, and I change its Text property to
> '12-3', and then I try to run the script...
>
> IB_Query1.Close;
> IB_Query1.SQL.Clear;
> IB_Query1.SQL.Add('Select * from DEPARTMENTS where ("Code" = '+ edit1.Text
> +')');
> IB_Query1.Open;
>
> ... when I try to run it, the following error message comes...
>
>
> Project Project1.exe raised exception class EIB_ISCERROR with message 'ISC
> ERROR CODE:335544334
> ISC ERROR MESSAGE:
> conversion error from string "12-3"
> '.Process stopped. Use Step or Run to continue.

Make sure you enclose the edit1.Text in additional quotes inside the SQL
since it's a string and the field needs to compare to a string value, not a
numeric one.

Woody (TMW)