The procedure is executed twice for the following reason - it is executed first to obtain the result set definition, second time it is executed normally. The solution to this issue as the same as it was suggested earlier which is to use a temporary table DatabaseExecute( "create table #my_results (col1 int, col2 ....)", rows ) DatabaseExecute( "insert into #my_results execute sp_name",rows ) DatabaseRetrieve( "select * from #my_results, rows ) DatabaseExecute( "drop table #my_results", rows ) : Hi, : We use 24x7 ver. 3.4.24 : We are trying to execute stored procedure and save result set to a file. : Here is the code we use: DatabaseRetrieve("execute : sp_name",rows_return ) : DatabaseSave( "c:\\temp\\test", "CSV", rows_return ) : We have log inside stored procedure and see that it executes twice every time : when we call it once. : This is not a new problem and we contacted you about it few years ago when we : use earlier versions. : Please let us know if there is any solution in version we use or later : versions. : Thank you
|