MariaRowSet Field ERROR in TGET READONLY Control

Post Reply
shri_fwh
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

MariaRowSet Field ERROR in TGET READONLY Control

Post by shri_fwh »

Dear Rao Sir ,

Have TGET control in DIALOG window and it has READYONLY attribute and the TGET reads data from a Mariarowset:column.

When TGET control gets cursor and throws an error as given below

Code: Select all

@40, 020  SAY  "Ledger"   SIZE 80, C_SAYH PIXEL COLOR C_SAYFCLR, C_SAYBCLR FONT oApp:oFontSay TRANSPARENT
   @40, 100  GET aoGET[ 1 ] VAR oAcLedRs:ACCT_NAME SIZE 400, C_GETH PIXEL OF oWnd READONLY FONT oApp:oFontGet UPDATE
   @70, 020  SAY  "Group"   SIZE 80, C_SAYH PIXEL COLOR C_SAYFCLR, C_SAYBCLR FONT oApp:oFontSay TRANSPARENT
   @70, 100  GET aoGET[ 2 ] VAR oAcLedRs:AGRP_NAME SIZE 400, C_GETH PIXEL OF oWnd READONLY FONT oApp:oFontGet UPDATE

 

Code: Select all


Application
===========
   Path and name: C:\VIMDEV32\VIMFA32\vimfa.exe (32 bits)
   Size: 7,937,024 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 19.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 2 mins 11 secs 
   Error occurred at: 28/12/2019, 20:04:04
   Error description: Error BASE/39  Write not allowed: va02:CL_BAL
   Args:
     [   1] = O   FWMARIAROWSET

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => FWMARIAROWSET:ERROR( 0 )
   Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:FIELDPUT( 2481 )

 
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by nageswaragunupudi »

Please check if you made the GET of oRs:CL_BAL as READONLY or not.
Regards

G. N. Rao.
Hyderabad, India
shri_fwh
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by shri_fwh »

Dear Rao Sir ,

Both TGET control and RowSet are in READONLY mode but, still it has error.

ROWSET

Code: Select all


   oPrdInfoRs:lReadOnly := .T.

 
TGET

Code: Select all

 @070, 870  GET aoGET[ 8 ] VAR oPrdInfoRs:OP_BAL_QTY SIZE 120, C_GETH PIXEL PICTURE "@Z 99,99,99,99,999" RIGHT OF oWnd READONLY FONT oApp:oFontGet UPDATE
 
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by nageswaragunupudi »

Please make the following 2 modifications in \fwh\source\classes\tget.prg.

METHOD lValid()
Present code:

Code: Select all

METHOD lValid() CLASS TGet

   local lRet := .t.

   if ::oGet:BadDate
 
Modify as:

Code: Select all

METHOD lValid() CLASS TGet

   local lRet := .t.

   if ::lReadOnly
      return lRet
   endif

   if ::oGet:BadDate
 
METHOD LostFocus()

Present code:

Code: Select all

METHOD LostFocus( hCtlFocus ) CLASS TGet

   ::Super:LostFocus( hCtlFocus )

#ifdef UTFREVN
 
Modify as:

Code: Select all

METHOD LostFocus( hCtlFocus ) CLASS TGet

   ::Super:LostFocus( hCtlFocus )

   if ::lReadOnly
      return nil
   endif

#ifdef UTFREVN
 
Regards

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

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by nageswaragunupudi »

This problem is not unique to Mariadb Rowsets but applies to all readonly datasources.
Here is an example with DBF opened READONLY.

Code: Select all

#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oGet

   USE CUSTOMER READONLY VIA "DBFCDX"

   DEFINE DIALOG oDlg SIZE 300,200 PIXEL TRUEPIXEL

   @  20,40 GET oGet VAR FIELD->ID     PICTURE "9999"    SIZE 150,30 PIXEL OF oDlg READONLY

   @  60,40 GET oGet VAR FIELD->SALARY PICTURE "999,999" SIZE 150,30 PIXEL OF oDlg READONLY

   @ 100,40 BUTTON "OK" SIZE 100,40 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED

return nil
 
Regards

G. N. Rao.
Hyderabad, India
shri_fwh
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by shri_fwh »

Dear Rao Sir ,

Changed as per your suggestion now its working..! Thanks a lot...!
Thanks
Shridhar
FWH 19.12, BCC 7 32 bit, MariaDB
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: MariaRowSet Field ERROR in TGET READONLY Control

Post by nageswaragunupudi »

The fix is incorporated in FWH2001
Regards

G. N. Rao.
Hyderabad, India
Post Reply