Yielding

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Marc

Yielding

Post by Marc » 24 Nov 2006, 11:09

 Posted by:  Marc 

Hallo

If I a Sql-direction that carry out lasts several minutes, functions the
yielding not correctly.

Code: Select all

On SAM_Timer
 Set df1 = df1 + 1
 Call SalUpdateWindow( hWndForm )

On SAM_Click
 Call SalYieldEnable( TRUE )
 Call SalYieldStartMessages( df1 )
 Call SalTimerSet( hWndForm , 1, 1000 )
 Call SalWaitCursor( TRUE )

 Set sSql = 'Select........ (5 minutes)

Call SalWaitCursor( FALSE )
Call SalYieldStopMessage( )

RainerE
Germany
Posts: 2245
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Yielding

Post by RainerE » 24 Nov 2006, 11:53

 Posted by:  Rainer Ebert 

Yes, that's a know "feature". While a request to a SQL server (e.g. SQLBase)
is waiting for response, the program does not process messages :-(

If you look in the windows task manager at that point, there stands "program
is not responding". Many times users do think, that the program has crashed.
They kill it with the task manager, restart it and execute the same query.
Problem is, that now the query nearly takes twice the time, because the 1st
query still is running. Killing an application on the client does not stop
the process on the server immediately.

Rainer

FRBhote
India
Posts: 2217
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Yielding

Post by FRBhote » 24 Nov 2006, 12:16

 Posted by:  F R Bhote 

An sometimes the users think the server has gone nuts and stop the service
and then its takes even longer to perform a rollback...

Marc

Re: Yielding

Post by Marc » 27 Nov 2006, 11:08

 Posted by:  Marc 

yielding not functions in this case?

RainerE
Germany
Posts: 2245
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Yielding

Post by RainerE » 28 Nov 2006, 09:28

 Posted by:  Rainer Ebert 

Yielding means processing messages. TD does not process messages while a SQL
statement is prepared and executed. So yielding does not work while a SQL
statement is prepared and executed.

Rainer

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests