TDolPhin query in XBROWSE is not working

TDolPhin query in XBROWSE is not working

Postby shri_fwh » Sun Oct 28, 2012 11:04 am

Hi All ,

TDolPhin Query XBROWSE is NOT working when XBROWSE is defined in the WINDOW MDICHILD, but the same code is working for DIALOG Window. I want to display XBROWSE in the MDICHILD WINDOW. Please guide for the same thanks in advance..!

Code: Select all  Expand view


   DEFINE WINDOW oW MDICHILD OF WndMain() PIXEL FROM FROM nTop, nLeft TO nBottom, nRight   ;
   COLOR C_FCLR, C_BCLR STYLE nOr( DS_MODALFRAME )

   oQry := oApp:gDBServer:Query( "select * from " + cItemMrp + " where item_id = " + Str( pnItemId ) + " order by item_mrp " )

   @ 80 , 40 XBROWSE oBrwMrp SIZE 250, 250 PIXEL ;
      OF oWnd  ;
      COLUMNS { "item_mrp", "batch_no", "sale_rate", "purc_rate", "op_unit_qty", "op_box_qty" } ;
      HEADERS { "M.R.P.", "Batch #", "Sales Rate", "Purc.Rate", "Op.Unit Qty.", "Op. Box Qty." } ;
      OBJECT oQry UPDATE

 

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: TDolPhin query in XBROWSE is not working

Postby kok joek hoa » Sun Oct 28, 2012 11:23 am

HI

DEFINE WINDOW oW MDICHILD OF WndMain()

maybe variable oW is wrong ???

regards,

kok
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: TDolPhin query in XBROWSE is not working

Postby ADutheil » Sun Oct 28, 2012 11:33 am

You define a window and browse in another one:

DEFINE WINDOW oW

@ 80 , 40 XBROWSE oBrwMrp SIZE 250, 250 PIXEL OF oWnd  
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: TDolPhin query in XBROWSE is not working

Postby shri_fwh » Sun Oct 28, 2012 11:35 am

Hi Kok ,

Sorry I had pasted wrong Code..! but It is not working the code and error details is given below.

Code: Select all  Expand view


   DEFINE DIALOG oWnd PIXEL TITLE cTitle FROM 0, 0 TO 550, 1020 FONT oApp:fNormal  ;
          COLOR CLR_BLACK, nRGB(209,209,209) STYLE nOr( DS_MODALFRAME, WS_POPUP )

   @ 80 , 40 XBROWSE oBrwMrp SIZE 200, 400 PIXEL ;
      OF oWnd  ;
      COLUMNS { "item_mrp", "batch_no", "sale_rate", "purc_rate", "op_unit_qty", "op_box_qty" } ;
      HEADERS { "M.R.P.", "Batch #", "Sales Rate", "Purc.Rate", "Op.Unit Qty.", "Op. Box Qty." } ;
      OBJECT oQry UPDATE

 


Error :

Application
===========
Path and name: E:\WTFASQL\VFASql.Exe (32 bits)
Size: 2,880,000 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 9656)
FiveWin Version: FWHX 12.08
Windows version: 6.1, Build 7600

Time from start: 0 hours 0 mins 6 secs
Error occurred at: 28/10/2012, 16:26:06
Error description: Error TDOLPHIN/9014 Internal Error:Invalid Result handle ""
Local 1: C ""
Local 2: O Class: ERROR
TDOLPHINSRV:CHECKERROR
P“

Stack Calls
===========
Called from: .\source\prg\tdolpsrv.prg => DOLPHIN_DEFERROR( 2807 )
Called from: .\source\prg\tdolpsrv.prg => TDOLPHINSRV:CHECKERROR( 793 )
Called from: .\source\prg\tdolpqry.prg => (b)TDOLPHINQRY:TDOLPHINQRY( 133 )
Called from: => TDOLPHINQRY:CHECKERROR( 0 )
Called from: .\source\prg\tdolpqry.prg => TDOLPHINQRY:GETROW( 987 )
Called from: .\source\prg\tdolpqry.prg => TDOLPHINQRY:SKIP( 1614 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:SETDOLPHIN( 4475 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE( 415 )
Called from: => TXBROWSE:SKIP( 0 )


Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: TDolPhin query in XBROWSE is not working

Postby Daniel Garcia-Gil » Sun Oct 28, 2012 2:34 pm

Hello

you are losing the handle of result...

oQry is invalid, please check if you have a oQry:end() before launch the browse
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: TDolPhin query in XBROWSE is not working

Postby ADutheil » Sun Oct 28, 2012 2:37 pm

You should end your query in the valid clause of the child window.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: TDolPhin query in XBROWSE is not working

Postby shri_fwh » Sun Oct 28, 2012 3:03 pm

Hi Daniel , André ,

Correct...! the oQry was ending before calling Browse. I had written oQry:end() after ACTIVATE WINDOW oWnd.


Code: Select all  Expand view


   ACTIVATE WINDOW oWnd

  //  oQry:END()  


 


Thanks a lot for your great support..! It is working now... :D

Thanks
Shridhar
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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