Board index » delphi » Command.execute MS SQL 7 Stored Procedure

Command.execute MS SQL 7 Stored Procedure

Hi,

I need some solution for this case:

 One ADO Command object execute MS SQL 7 Stored Procedure, that have very
hard
work (checking, updating, inserting and etc. more that 8 000 000 records
from 7-8 tables in deferent's DB, in 3 linked servers). Whit this servers
work also more of 450 users in same time. Execution time for this Stored
procedure is typically about 30-40 min. Also, stored procedure return
_Recordset with about 30 000 records.
Is it way to check current state of execution of stored procedure?
How to "cancel" execution of this stored procedure, when in the line
Connection.Execute, thread freeze, until Execute method finished?

Tnx

--

 

Re:Command.execute MS SQL 7 Stored Procedure


I'm not an expert on ADO, but have been working with stored procedures the
last couple of weeks and so have read a bunch of the help screens on the
various components.  Here's a quote from TADOCommand's help:

"TADOCommand is most often used for executing data definition language (DDL)
SQL commands or to execute a stored procedure that does not return a result
set. For those SQL statements that do return a result set, a TADODataSet,
TADOQuery, or TADOStoredProc is better suited to the task."

Also, TADOCommand doesn't have any events.  But, TADOStoredProc has
OnFetchProgress which is what you might be looking for.

David Cornelius

Quote
"Ivan Kojuharov" <ikojuha...@bitex.com> wrote in message

news:3ab240c4_2@dnews...
Quote
> Hi,

> I need some solution for this case:

>  One ADO Command object execute MS SQL 7 Stored Procedure, that have very
> hard
> work (checking, updating, inserting and etc. more that 8 000 000 records
> from 7-8 tables in deferent's DB, in 3 linked servers). Whit this servers
> work also more of 450 users in same time. Execution time for this Stored
> procedure is typically about 30-40 min. Also, stored procedure return
> _Recordset with about 30 000 records.
> Is it way to check current state of execution of stored procedure?
> How to "cancel" execution of this stored procedure, when in the line
> Connection.Execute, thread freeze, until Execute method finished?

> Tnx

> --

Re:Command.execute MS SQL 7 Stored Procedure


Basically, you need to execute your SP asynchronously. This makes adoCommand
event-driven. See executeOptions property for details and also Cancel
method.

Alex

Quote
"Ivan Kojuharov" <ikojuha...@bitex.com> wrote in message

news:3ab240c4_2@dnews...
Quote
> Is it way to check current state of execution of stored procedure?
> How to "cancel" execution of this stored procedure, when in the line
> Connection.Execute, thread freeze, until Execute method finished?

Re:Command.execute MS SQL 7 Stored Procedure


Thank you!

Iv..

Other Threads