TfrxAdoQuery: columns are lost after execute
Hi,
we need to execute ADO Stored procedures. FastReport doens't have that component (yet [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />), but we can use TfrxAdoQuery. SQL code is simple:[/img]
It is working. I fill Parameters and after confirming SQL is query executed. I got fields and all is fine. But - after executing report (from Design time) is another refresh called. And - that is trouble - stored parameters are not used. Report designer just send NULL's to all parameters. And if stored procedure needs that data then returns nothing. And when FastReport see it then immediately delete Query columns.
I must go to TfrxAdoQuery.SQL - open editor - and press SAVE/Execute again to bring columns back.
TfrxAdoQuery should use parameters values instead NULL during calling refresh.
we need to execute ADO Stored procedures. FastReport doens't have that component (yet [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />), but we can use TfrxAdoQuery. SQL code is simple:[/img]
EXEC dbo.StoredProcName @param1 = :param1, @param2 = :param2
It is working. I fill Parameters and after confirming SQL is query executed. I got fields and all is fine. But - after executing report (from Design time) is another refresh called. And - that is trouble - stored parameters are not used. Report designer just send NULL's to all parameters. And if stored procedure needs that data then returns nothing. And when FastReport see it then immediately delete Query columns.
I must go to TfrxAdoQuery.SQL - open editor - and press SAVE/Execute again to bring columns back.
TfrxAdoQuery should use parameters values instead NULL during calling refresh.
Comments
where is code located and in what event
does this only happen when running from ide or at runtime as well?
Sample Stored procedure:
In report:
TfrxAdoQuery.SQL: EXEC frx_TestProcedure_PRINT @dbname = :ProcedureName
And I will remove your site from my base within 24 hours
webmastegz