Problems with an application using ADO

Re: Problems with an application using ADO

Postby James Bott » Mon Jun 10, 2013 10:41 pm

Lucas,

It was not in previous build, so it is related with MsgBar or changes in TControl/TWindow as a result of a post from Antonio´s at Harbour Developers list.


Do you have, or can you make, a small example program that shows the problem so Antonio can find a solution?

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems with an application using ADO

Postby Antonio Linares » Tue Jun 11, 2013 12:02 am

Yes. please. we need an example. thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problems with an application using ADO

Postby lucasdebeltran » Tue Jun 11, 2013 7:52 am

Antonio,

samples\ribbon.prg

Open and wait 15 minutes. Next, click on Cut/copy.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Problems with an application using ADO

Postby nageswaragunupudi » Tue Jun 11, 2013 9:31 am

lucasdebeltran wrote:Antonio,

samples\ribbon.prg

Open and wait 15 minutes. Next, click on Cut/copy.


I confirm the problem that the application freezes if the prg is built with Harbour. We need to kill the task from Task Manager.

There is no problem if built with xHarbour.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with an application using ADO

Postby nageswaragunupudi » Tue Jun 11, 2013 9:45 am

Enrico Maria Giordano wrote:Dear friends, have you ever had problem with ADO? My customer says that the application freezes at random point and loose the buttonbar icons. Other applications using DBFs works fine. It says that the problem started a couple of days ago. I can't reproduce it in my XP (he's using W7).

Any ideas?

EMG

Obviously the program was not built with FWH 13.05.
May we know if the app was built with xHarbour or Harbour?

In my experience over years, ADO application could freeze if the connection to the Server is lost due to network failure while a connection is open. Except that I never found any other difference between dbf based and ado based application.

Other issues that were discussed relate to resource leaks and freezing of app built with FWH13.05 and Harbour in the case Mr Lucas pointed out.

Losing of bitmaps can happen when there are resource leaks in any application ( fwh or not ) that were run or running currently on the PC. We have means to check resource leaks in an FW app before release.

The issue relating to Harbour appln built with FWH13.05 exists and we need to find solution. The fact that app built with xHarbour does not freeze should give some clue. But I dont think this has any relation to the problem reported by Mr EMG in his first post.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with an application using ADO

Postby Enrico Maria Giordano » Tue Jun 11, 2013 10:12 am

Nageswararao,

nageswaragunupudi wrote:Obviously the program was not built with FWH 13.05.


The problem is with FWH 13.05.

nageswaragunupudi wrote:May we know if the app was built with xHarbour or Harbour?


xHarbour.

nageswaragunupudi wrote:In my experience over years, ADO application could freeze if the connection to the Server is lost due to network failure while a connection is open. Except that I never found any other difference between dbf based and ado based application.


The problem is not tied to ADO, as I already pointed out.

nageswaragunupudi wrote:The fact that app built with xHarbour does not freeze should give some clue.


As I already said, I'm using xHarbour and the app does freeze.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problems with an application using ADO

Postby nageswaragunupudi » Tue Jun 11, 2013 10:15 am

lucasdebeltran wrote:Antonio,

samples\ribbon.prg

Open and wait 15 minutes. Next, click on Cut/copy.


While we shall be working on this, can you please indicate if you experienced such a freeze in apps without using ribbonbar?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with an application using ADO

Postby nageswaragunupudi » Tue Jun 11, 2013 10:18 am

Mr EMG
As I already said, I'm using xHarbour and the app does freeze.

The app indicated by Lucas is not freezing when I built with xHarbour.
While I keep trying again, can you suggest any other such program?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with an application using ADO

Postby Enrico Maria Giordano » Tue Jun 11, 2013 10:31 am

I think that the problem might be the following line in tmsgitem.prg:

Code: Select all  Expand view
METHOD Refresh() INLINE ::hBack := nil, ::oMsgBar:Refresh()


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problems with an application using ADO

Postby Daniel Garcia-Gil » Tue Jun 11, 2013 10:34 am

Enrico

yes is there, to solve

Code: Select all  Expand view
METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Problems with an application using ADO

Postby Enrico Maria Giordano » Tue Jun 11, 2013 10:40 am

Daniel,

Daniel Garcia-Gil wrote:Enrico

yes is there, to solve

Code: Select all  Expand view
METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()


Ok, but the other problem is that there is already a Refresh method defined in that class.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problems with an application using ADO

Postby Daniel Garcia-Gil » Tue Jun 11, 2013 10:55 am

no problem

set all together

Code: Select all  Expand view

METHOD Refresh() CLASS TMsgItem

   local cMsg

   if ::bMsg != nil
      cMsg = cValToChar( Eval( ::bMsg ) )
      if cMsg != ::cMsg .or. ::lActive != ::lWasActive
         ::cMsg = cMsg
         if IsWindowVisible( ::oMsgBar:hWnd )
            ::Paint()
         endif  
         ::lWasActive = ::lActive
      endif
   endif

   DeleteObject( ::hBack)
   ::hBack := nil
   ::oMsgBar:Refresh()

return nil
 


and delete

Code: Select all  Expand view
METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Problems with an application using ADO

Postby nageswaragunupudi » Tue Jun 11, 2013 12:30 pm

This fixes the msgbar problem, including a resource leak.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10633
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problems with an application using ADO

Postby Enrico Maria Giordano » Tue Jun 11, 2013 3:21 pm

Strangely enough, my answer is vanished. Anyone of the admins have deleted it for any reasons? Anyway, here it is again:

Daniel,

Daniel Garcia-Gil wrote:no problem

set all together

Code: Select all  Expand view

METHOD Refresh() CLASS TMsgItem

   local cMsg

   if ::bMsg != nil
      cMsg = cValToChar( Eval( ::bMsg ) )
      if cMsg != ::cMsg .or. ::lActive != ::lWasActive
         ::cMsg = cMsg
         if IsWindowVisible( ::oMsgBar:hWnd )
            ::Paint()
         endif  
         ::lWasActive = ::lActive
      endif
   endif

   DeleteObject( ::hBack)
   ::hBack := nil
   ::oMsgBar:Refresh()

return nil
 


and delete

Code: Select all  Expand view
METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()


Are you absolutely sure this is the correct fix for the freezing problem? My client is angry... :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Problems with an application using ADO

Postby Enrico Maria Giordano » Tue Jun 11, 2013 3:21 pm

NageswaraRao,

nageswaragunupudi wrote:This fixes the msgbar problem, including a resource leak.


Thank you.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8714
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano and 29 guests