Subject Re: [IBO] Problem with TIBOQuery
Author Helen Borrie
At 09:55 AM 20-12-01 -0200, you wrote:
>Hi Helen,
>
>Thanks for your help.
>
>I made the changes, except the "Dataset.ParamByName" because of a
>"Undeclared identifier: 'ParamByName" error, and i'm still getting an empty
>dataset.

OK, sorry, it needed to be
with TIBODataset(Dataset) do begin...


>If i right click the TIBOQuery and enter in the Edit mode, i can prepare,
>set the param to 12 and open the DataSet, and it works fine.
>
>it seems to me that it is not passing the parameter at run-time and get no
>data since there isn't "MES=0" in the table.

What is the SQL Monitor telling you?

Also, have you tried placing the parameter assignment code into the AfterPrepare event instead of BeforeOpen?


>This same problem is hapening with other TIBOQuery linked to another table.
>Other TIBOQueries without paremeters works fine. Could be a conection
>problem ? I'm using TIBODatabase.

It shouldn't be a problem if you a using TIBODatabase - as long as the queries are properly connected to it...if not, and the datasets are forming their own connections, it's a guess that the transaction might not actually be started at the time the BeforeOpen event runs.

The monitor should indicate what is going on.

Please would you trim your messages. Thanks.

Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________