Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread EDBProgressEvent
Wed, Jul 9 2008 3:51 AMPermanent Link

Robin Joseph
Tim,

using vs2008, EDB 2.01 .net

Does the EDBProgressEvent 'work' for stored procedures?

I use the following basic code:

           EDBCommand DataCommand = new EDBCommand();
           try
               {
               DataCommand.OnProgress += new EDBProgressEvent(DataCommand_OnProgress);
// ***************
               DataCommand.CommandText = CommandName;   // Stored Procedure Name
               DataCommand.CommandType = CommandType.StoredProcedure;
               DataCommand.Connection = GetOpenConnection();  // Get remote EDBConnection
               DataCommand.Prepare();

               EDBDataAdapter DataAdapter = new EDBDataAdapter(DataCommand);
               try
                   {
                   DataTable EDBDataTable = new DataTable(TableName);
                   DataAdapter.Fill(EDBDataTable);
                   CloseOpenConnection();  // close the remote connection
                   }
               finally
                   {
                   DataAdapter.Dispose();
                   }
               }
           finally
               {
               DataCommand.Dispose();
               }

The DataCommand_OnProgress method is called 4 times with the values of e.PercentDone of
0,0,100,100

With Thanks

Robin Joseph
Wed, Jul 9 2008 3:02 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robin,

<< Does the EDBProgressEvent 'work' for stored procedures? >>

Yes, but you have to provide the progress inside of the stored procedure via
the SQL/PSM SET PROGRESS statement in 2.x:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=13&topic=249

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 10 2008 3:23 AMPermanent Link

Robin Joseph
Tim,

Thank you - I missed that in the manual.

Is it possible to obtain the progress of each individual statement within the stored
procedure?
eg.
PREPARE Stmt FROM 'SELECT * FROM Customer';
OPEN CustCursor;
in the manual example. - this might take a while for a non-sensitive cursor.

If not possible - could you  consider this for a future enhancement?
It would be useful when there are a number of statements in a procedure that may take a
significant period of time to execute.


With thanks

Robin Joseph
Thu, Jul 10 2008 3:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Robin


The OnProgress event works properly only for TEDBQuery I think. Tim's adding something into the script based stuff to communicate back to the outside world.

Roy Lambert
Thu, Jul 10 2008 2:53 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Robin,

<< Is it possible to obtain the progress of each individual statement within
the stored procedure? >>

Yes, it's something that I've been thinking about.  Something along the
lines of a "relay any progress back to the main application" statement that
can be turned on or off.  That way you can just relay the existing progress
if you want, or roll your own if you want.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 10 2008 6:55 PMPermanent Link

Robin Joseph
Tim,

That would be ideal.

Thank you

Robin

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote:

Robin,

<< Is it possible to obtain the progress of each individual statement within
the stored procedure? >>

Yes, it's something that I've been thinking about.  Something along the
lines of a "relay any progress back to the main application" statement that
can be turned on or off.  That way you can just relay the existing progress
if you want, or roll your own if you want.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image