Subject Re: [ib-support] parms in sql statements, NOT stored procedures
Author Doug Chamberlin
At 3/7/2001 10:02 AM (Wednesday), Lee Catlett wrote:
>Can someone enlighten this unenlightened rather new person to IB query
>constructs. I'm trying to migrate an app fro SQL to IB and have dozens
>of queries of the following nature:
>
>select *
>from atable
>where firstID =: firstID
>and secondID =: secondID
>
>from a table like:
>
>firstID char(30)
>secondID char(30)
>etc.....
>
>with firstID being the only key. The error returned states that it
>doesn't know what secondID is. Since they are both used as parms and
>their values set in code, how do you do this in the IB world, if you can
>at all. Thanks

The error report you are seeing is not a general, fundamental error but is
specific to the exact text you are setting in the SQL property. It also
sounds like the error is related to your client code, not specific to
Interbase.

For example, from the above I can see that the "=: firstID" should be
changed to "= :firstID" (remove the space after the colon). Could it be
that you have been inconsistent with your typing?