Inactive Connections?

forum.centura.web.developer (2000-2005) & forum.td.web (2005-2010)
czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Inactive Connections?

Post by czavala » 05 Jan 2007, 16:06

 Posted by:  Conrado Zavala 

Dear Forum,

Monitoring my web application with the SQLConsole I saw that after a user
sign off the application [ WebQuit( ) ] all cursors connected to the
database remain as "Inactive". This particular case gets my attention
because on my "Legacy" application after a user sign off [ SalQuit( ) ] all
previously connected cursor are completely removed from the database. As a
regular procedure I disconnect all my cursor after I've obtained every
result set [ SqlDisconnect( hSql ) ] this is why this results to be estrange
for me to be happening.

As always I will appreciate any advice. Attached You will find a "Screen
Shot" of my SQLConsole feedback.

Regards,

Conrado

Attachment: SQLConsole.jpg

Yannick Fenner

Inactive Connections?

Post by Yannick Fenner » 05 Jan 2007, 16:48

 Posted by:  Yannick Fenner 

Hi Conrado,

It may come from a connection you would do when creating a window.

Since the window is not destroyed until you close the application with the
application manager, the cursor stays.

I think about that because it is a classic behaviour, although it may not be
your case...

Y.

czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Inactive Connections?

Post by czavala » 05 Jan 2007, 19:26

 Posted by:  Conrado Zavala 

Hello Yannick,

Thanks for Your answer. Under my WEB_Create I create only state variables
and on WEB_Destroy I destroy them.

My cursors are connected only when I have to retrieve data from the database
(i.e. on SAM_DropDown or SAM_Click) and my code always looks like this:

On SAM_DropDown
If SqlConnect( hSql )
Set sSql = "SELECT..."
Call SalListPopulate( hSql, sSql )
Call SqlCommit( hSql )
Call SqlDisconnect( hSql )

OR

On SAM_Click
If SqlConnect( hSql )
Set sSql = "SELECT..."
Call SalTblPopulate( hWndTable, hSql, sSql, TBL_FillAll )
Call SqlCommit( hSql )
Call SqlDisconnect( hSql )

Again, thanks for your reply.

Regards,

Conrado

czavala
Honduras
Posts: 197
Joined: 02 Oct 2018, 17:35
Location: San Pedro Sula, Honduras

Inactive Connections?

Post by czavala » 05 Jan 2007, 23:16

 Posted by:  Conrado Zavala 

Hello Yannick,

Thank You... I review my code and found that I was leaving two cursors
connected to the database...

Regards,

Conrado

Return to “td.web”

Who is online

Users browsing this forum: [Ccbot] and 0 guests