Problems with an application using ADO

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

Re: Problems with an application using ADO

Post by James Bott »

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
Antonio Linares
Site Admin
Posts: 42831
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 155 times
Been thanked: 119 times
Contact:

Re: Problems with an application using ADO

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: Problems with an application using ADO

Post by lucasdebeltran »

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
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problems with an application using ADO

Post by nageswaragunupudi »

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: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problems with an application using ADO

Post by nageswaragunupudi »

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
Enrico Maria Giordano
Posts: 8784
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems with an application using ADO

Post by Enrico Maria Giordano »

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
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problems with an application using ADO

Post by nageswaragunupudi »

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: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problems with an application using ADO

Post by nageswaragunupudi »

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
Enrico Maria Giordano
Posts: 8784
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems with an application using ADO

Post by Enrico Maria Giordano »

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

Code: Select all | Expand

METHOD Refresh() INLINE ::hBack := nil, ::oMsgBar:Refresh()


EMG
User avatar
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Problems with an application using ADO

Post by Daniel Garcia-Gil »

Enrico

yes is there, to solve

Code: Select all | Expand

METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
Enrico Maria Giordano
Posts: 8784
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems with an application using ADO

Post by Enrico Maria Giordano »

Daniel,

Daniel Garcia-Gil wrote:Enrico

yes is there, to solve

Code: Select all | Expand

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
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Problems with an application using ADO

Post by Daniel Garcia-Gil »

no problem

set all together

Code: Select all | Expand


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

METHOD Refresh() INLINE DeleteObject( ::hBack), ::hBack := nil, ::oMsgBar:Refresh()
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Problems with an application using ADO

Post by nageswaragunupudi »

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

G. N. Rao.
Hyderabad, India
User avatar
Enrico Maria Giordano
Posts: 8784
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems with an application using ADO

Post by Enrico Maria Giordano »

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


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

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: 8784
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 9 times
Contact:

Re: Problems with an application using ADO

Post by Enrico Maria Giordano »

NageswaraRao,

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


Thank you.

EMG
Post Reply