reopen xBrowse alias resulted in error - PARTIALLY SOLVED

reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby fraxzi » Mon Nov 10, 2014 5: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?
Last edited by fraxzi on Mon Nov 10, 2014 6:50 am, edited 1 time in total.
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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby fraxzi » Mon Nov 10, 2014 6: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby nageswaragunupudi » Mon Nov 10, 2014 5: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
User avatar
nageswaragunupudi
 
Posts: 10308
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby Rick Lipkin » Mon Nov 10, 2014 6: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
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10308
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: reopen xBrowse alias resulted in error - PARTIALLY SOLVED

Postby fraxzi » 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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 33 guests