Subject | Re: [IBO] preparing query |
---|---|
Author | Helen Borrie (TeamIBO) |
Post date | 2002-04-23T14:21:59Z |
At 11:01 AM 23-04-02 -0300, you wrote:
specifications of the query: you use it to change columns of the selection
criteria. That causes the query to get unprepared. Therefore,
OnPrepareSQL is the *only* place where you can alter SQLWhereItems.
If you only want to change the values of existing parameters, then don't
use SQLWhereItems - it is not what you want. Use ParamByName() or Params[]
in the BeforeOpen event. In this case, if the query is already prepared,
it doesn't need to be prepared again...ParamByName() will do a Prepare if
one is needed but you must always call Prepare before calling Params[].
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com
>I can't put on the onprepared event because the query is open and I want toSorry, but you can't do that. SQLWhereItems actually changes the
>apply the sqlwhereitems after the user perform a buttonclick. My statments
>is created automatically according the user choose the options in the
>program.
specifications of the query: you use it to change columns of the selection
criteria. That causes the query to get unprepared. Therefore,
OnPrepareSQL is the *only* place where you can alter SQLWhereItems.
If you only want to change the values of existing parameters, then don't
use SQLWhereItems - it is not what you want. Use ParamByName() or Params[]
in the BeforeOpen event. In this case, if the query is already prepared,
it doesn't need to be prepared again...ParamByName() will do a Prepare if
one is needed but you must always call Prepare before calling Params[].
regards,
Helen Borrie (TeamIBO Support)
** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com