FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Mon Nov 10, 2014 05:09 AM

Dear All,

This could be a silly question but I think it's worth the try.

I have an SQL query which alias uses by xBrowse. This query resulted to static (views) and I need to refresh it.
I know and i'm aware that static cursors/views are read-only and cannot be update-able and the only solution is to close and re-open it again.

So I looking at re-executing the SQL script if I wish to refresh records.

But active xBrowse with this SQL alias does not allow it to be closed.

Is there a way xBrowse can be paused while I close and reopen again SQL alias?

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Mon Nov 10, 2014 06:01 AM

Dear All,

a less complicated solution is to open the SQL alias with different alias used by xBrowse and assign it.

Any more better ideas are welcome.

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Mon Nov 10, 2014 05:01 PM
a less complicated solution is to open the SQL alias with different alias used by xBrowse and assign it.

This is right solution
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Mon Nov 10, 2014 06:29 PM

Francis

If you use objects for your recordset .. you can oRs:CLose() and then oRs:Open() with a new query and then oLbx:ReFresh() .. just do not reassign oRs .. leave its properties intact.

Rick Lipkin

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Tue Nov 11, 2014 12:08 AM
Rick Lipkin wrote:Francis

If you use objects for your recordset .. you can oRs:CLose() and then oRs:Open() with a new query and then oLbx:ReFresh() .. just do not reassign oRs .. leave its properties intact.

Rick Lipkin


Mr Rick

That is because the way of your coding. You use oRs directly in all codeblocks.
But we designed xbrowse to safely reassign oRs

In fact in most of the cases, after creating the xbrowse, there is no need to use the oRs variable in our program code.
Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED
Posted: Tue Nov 11, 2014 12:34 AM

RAO,
Rick,

Thanks for the feedback.

I'm in the middle of earth between shortest code and efficiency.. so far both your recommendations are worth considering.

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion