Page 1 of 2

BASE/39 Write not allowed in MariaDB

Posted: Sun May 03, 2020 9:37 pm
by Horizon
Hi,

I got an error message:

Code: Select all

   Error occurred at: 04/05/2020, 00:22:06
   Error description: Error BASE/39  Write not allowed: yapilan:YPL_BNK1
   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( 2482 )
   Called from: .\source\internal\FWROWSET.PRG => FWMARIAROWSET:_YPL_BNK1( 1279 )
   Called from: .\IcraKart.prg => YAP_KAYIT( 9182 )

Code: Select all

        oRs:Append()
        oTb_YAPILAN:D_BOS(YENIKAYIT)

        oRs:YPL_BNK1    := nBankami                    <<--- 9182
        oRs:TL_ILI      := xxxTL_ILI
        oRs:TL_DN       := xxxTL_DN
        oRs:TL_DAIRE    := xxxTL_DAIRE
        oRs:YPL_Param := xxxYPL_Param
        oRs:YPL_1           := xxID  
        oRs:YPL_3       := xxNOT
        oRs:YPL_6       := 1
When I remark line 9182, there is not any problem.

Code: Select all

CREATE TABLE `yapilan` (
    `YPL_0` INT(11) NOT NULL AUTO_INCREMENT,
    `YPL_1` INT(11) NULL DEFAULT NULL,
    `YPL_2` DATE NULL DEFAULT NULL,
    `YPL_3` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `YPL_6` SMALLINT(6) NULL DEFAULT NULL,
    `YPL_7` VARCHAR(5) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `MERCI` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `MKOD` VARCHAR(10) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `CEVAP` SMALLINT(6) NULL DEFAULT NULL,
    `CKOD` SMALLINT(6) NULL DEFAULT NULL,
    `ACIK` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `DURUM` SMALLINT(6) NULL DEFAULT NULL,
    `ADRES` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `YPL_8` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `KIM` INT(11) NULL DEFAULT NULL,
    `ACIK1` VARCHAR(15) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TAKIP` BIT(1) NULL DEFAULT b'0',
    `OPERASYON` SMALLINT(6) NULL DEFAULT NULL,
    `TL_ILI` VARCHAR(15) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TL_DN` VARCHAR(10) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TL_DAIRE` SMALLINT(6) NULL DEFAULT NULL,
    `TL_HACIZ` BIT(1) NULL DEFAULT b'0',
    `YPL_PARAM` VARCHAR(30) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TUTAR` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TEBTAR` DATE NULL DEFAULT NULL,
    `TEBTAR2` DATE NULL DEFAULT NULL,
    `TEBTAR3` DATE NULL DEFAULT NULL,
    `YPL_9` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `YPL_TEBID` INT(11) NULL DEFAULT NULL,
    `YPL_TBIDS` LONGTEXT NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `ADRES_ILC` VARCHAR(35) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TEB_BILA1` BIT(1) NULL DEFAULT b'0',
    `TEB_BILA2` BIT(1) NULL DEFAULT b'0',
    `TEB_BILA3` BIT(1) NULL DEFAULT b'0',
    `TEB_KIME1` VARCHAR(25) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TEB_KIME2` VARCHAR(25) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `TEB_KIME3` VARCHAR(25) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `YPL_YPID` INT(11) NULL DEFAULT NULL,
    `YPL_DTAR1` DATE NULL DEFAULT NULL,
    `YPL_DTAR2` DATE NULL DEFAULT NULL,
    `YPL_BSEBEP` BIT(1) NULL DEFAULT b'0',
    `YPL_BGID` INT(11) NULL DEFAULT NULL,
    `YPL_BNK1` SMALLINT(6) NULL DEFAULT NULL,
    `YPL_BGID2` INT(11) NULL DEFAULT NULL,
    `YPL_BNK` BIT(1) NULL DEFAULT b'0',
    `YPL_HSIRA` SMALLINT(6) NULL DEFAULT NULL,
    `MERCI_ID` VARCHAR(35) NULL DEFAULT NULL COLLATE 'latin5_turkish_ci',
    `NTUTAR` DECIMAL(14,2) NULL DEFAULT NULL,
    PRIMARY KEY (`YPL_0`) USING BTREE
)
COLLATE='latin5_turkish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2517
;
I have checked oRs:lReadOnly is .F.

Any comment?

Re: BASE/39 Write not allowed in MariaDB

Posted: Mon May 04, 2020 8:57 am
by Horizon
Hi,

I think I found my mistake.

in oTb_YAPILAN:D_BOS(YENIKAYIT)

Code: Select all

  oRec:SetDefault("YPL_BNK1", 3)
 
This procedure set my default variables to table fieldnames. I thought SetDefault is valid for FWMARIAROWSET like TDATAROW.

SetDefault also sets the fieldname as a readonly variable in FWMARIAROWSET Class.

Mr Rao. Can you confirm me? If it is I should change lots of lines in my application.

Edit :

Code: Select all

  oRec:SetDefault("YPL_BNK1", 3, .F.)
I have changed to SetDefault like above and problem is solved. Mr. Rao, Can you confirm it?

Thanks.

Re: BASE/39 Write not allowed in MariaDB

Posted: Mon May 04, 2020 3:07 pm
by nageswaragunupudi
Rowset:
oRs:SetDefault( field, uValue, lReadOnly ) // default lReadOnly is .t.

Re: BASE/39 Write not allowed in MariaDB

Posted: Mon May 04, 2020 3:23 pm
by Horizon
nageswaragunupudi wrote:Rowset:
oRs:SetDefault( field, uValue, lReadOnly ) // default lReadOnly is .t.
I could not find SetDefault in http://wiki.fivetechsoft.com/doku.php?i ... connection

I have learnt.

Thanks.

Re: BASE/39 Write not allowed in MariaDB - SOLVED

Posted: Tue May 05, 2020 10:11 am
by nageswaragunupudi

Re: BASE/39 Write not allowed in MariaDB

Posted: Mon Jun 01, 2020 5:11 pm
by Horizon
nageswaragunupudi wrote:Rowset:
oRs:SetDefault( field, uValue, lReadOnly ) // default lReadOnly is .t.
Hi Mr. Rao,

Is it valid for TDataRow class?

Re: BASE/39 Write not allowed in MariaDB - SOLVED

Posted: Tue Jun 02, 2020 3:48 am
by nageswaragunupudi
There is a similar method in TDataRow also.

But it should be enough if you set default in the rowset class.

Re: BASE/39 Write not allowed in MariaDB - SOLVED

Posted: Tue Jun 02, 2020 8:54 am
by Horizon
nageswaragunupudi wrote:There is a similar method in TDataRow also.

But it should be enough if you set default in the rowset class.
Hi Mr. Rao,

I have a procedure for every table to set defaults (not READONLY). I use this procedures for set default both rowset and datarow class object. oRs:Setdefault accept lReadonly parameter, but oRec:SetDefault dont.
Why I use SetDefault function for it. When I enter a new record called from editbaserecord, Save button is should be disabled. I used to assign defaults directly but Save button does not act what I want.
I have changed all my application to use SetDefault.

Is there any lReadOnly parameter in TDataRow? I need .f.

Thanks

Re: BASE/39 Write not allowed in MariaDB

Posted: Tue Jun 02, 2020 9:24 am
by nageswaragunupudi
Is there any lReadOnly parameter in TDataRow? I need .f.
Yes

Re: BASE/39 Write not allowed in MariaDB

Posted: Tue Jun 02, 2020 9:37 am
by Horizon
Hi Mr. Rao,

Code: Select all

oRec:SetDefault("KRM_TIP", "S", .F.)
This error gives:

Code: Select all

Application
===========
   Path and name: C:\PrgW_SQL\Icra\IcraW.exe (32 bits)
   Size: ********* bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.04
   C compiler version: Microsoft Visual C++ 19.20.27508 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 15 secs 
   Error occurred at: 02/06/2020, 12:34:00
   Error description: Error BASE/39  Write not allowed: TDATAROW:KRM_TIP
   Args:
     [   1] = O   TDATAROW

Stack Calls
===========
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDATAROW:ERROR( 0 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:FIELDPUT( 643 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:_KRM_TIP( 2390 )
   Called from: .\Borc.prg => (b)GET_BORC( 138 )
   Called from: .\dbcombo.prg => TDBCOMBO:LOSTFOCUS( 404 )
   Called from: .\source\classes\CONTROL.PRG => TDBCOMBO:KILLFOCUS( 1150 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1790 )
   Called from: .\source\classes\COMBOBOX.PRG => TDBCOMBO:HANDLEEVENT( 923 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => DIALOGBOXINDIRECTW( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 448 )
   Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 24 )
   Called from:  => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDATAROW:ERROR( 0 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:FIELDPUT( 643 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:_UY_8( 2390 )
   Called from: .\Borc.prg => (b)GET_BORC( 238 )
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:SET( 626 )
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:DEFAULT( 1035 )
   Called from: .\source\classes\COMBOBOX.PRG => TCOMBOBOX:INITIATE( 950 )
   Called from:  => __OBJSENDMSG( 0 )
   Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
   Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 805 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 330 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:DEFAULT( 849 )
   Called from: .\source\classes\TFOLDEX.PRG => TFOLDEREX:INITIATE( 1047 )
   Called from:  => __OBJSENDMSG( 0 )
   Called from: .\source\function\HARBOUR.PRG => OSEND( 291 )
   Called from: .\source\function\HARBOUR.PRG => ASEND( 259 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 805 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1120 )
   Called from:  => DIALOGBOXINDIRECTW( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: .\TOb_Browse1_SQL.prg => TYK_DETAY_SQL:ACTIVATE( 1844 )
   Called from: .\TOb_Browse2_SQL.prg => TYK_DLIST_SQL:GO_DDETAYS_EKLE( 710 )
   Called from: .\TOb_Browse2_SQL.prg => (b)TYK_DLIST_SQL_GO_DDETAY_EKLE( 657 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:EDIT( 1886 )
   Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:EDITBASERECORD( 4919 )
   Called from: .\TOb_Browse2_SQL.prg => TYK_DLIST_SQL:GO_DDETAY_EKLE( 657 )
   Called from: .\TOb_Browse2_SQL.prg => (b)TYK_DLIST_SQL_NEW( 490 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 705 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 991 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2043 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => DIALOGBOXINDIRECTW( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: .\TOb_Browse1_SQL.prg => TYK_DETAY_SQL:ACTIVATE( 1844 )
   Called from: .\TOb_Browse1_SQL.prg => TYK_LIST_SQL:GO_DETAYS( 914 )
   Called from: .\TOb_Browse1_SQL.prg => (b)TYK_LIST_SQL_GO_DETAY( 876 )
   Called from: .\source\classes\DATAROW.PRG => TDATAROW:EDIT( 1886 )
   Called from: .\source\internal\FWMARIA.PRG => FWMARIAROWSET:EDITBASERECORD( 4919 )
   Called from: .\TOb_Browse1_SQL.prg => TYK_LIST_SQL:GO_DETAY( 876 )
   Called from: .\TOb_Browse1_SQL.prg => (b)TYK_LIST_SQL_NEW( 494 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 705 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 991 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 2043 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => DIALOGBOXINDIRECTW( 0 )
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
   Called from: .\TOb_Browse1_SQL.prg => TYK_LIST_SQL:NEW( 552 )
   Called from: .\IcraKart.prg => ICRAKART( 156 )
   Called from: .\Master.prg => (b)DEFINE_RIBBON( 2096 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:CLICK( 717 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:LBUTTONUP( 920 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: .\source\classes\TRBTN.PRG => TRBTN:HANDLEEVENT( 1578 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )

System
======
   CPU type: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2208 Mhz
   Hardware memory: 16268 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 4
      1 , C:\PrgW_SQL\Icra\IcraW.exe                                                                          
      2 GDI+ Window (IcraW.exe), C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.264_none_4298d4188a939fa 
      3 HideForm, C:\PrgW_SQL\Icra\FrSystH.dll                                                                        
      4 LOGI_RAWINPUT_WND,                                                                                                     

Variables in use
================
   Procedure     Type   Value
   ==========================
   __ERRRT_SBASE
     Param   1:    O    Class: ERROR
   TDATAROW:ERROR
     Param   1:    N    13
     Param   2:    N    39
     Param   3:    C    "Write not allowed"
     Param   4:    C    "TDATAROW:KRM_TIP"
     Param   5:    N    1
     Param   6:    O    Class: TDATAROW
     Local   1:    U    
     Local   2:    U    
   TDATAROW:FIELDPUT
     Param   1:    C    "Write not allowed"
     Param   2:    C    "TDATAROW"
     Param   3:    C    "KRM_TIP"
     Param   4:    N    39
     Param   5:    A    Len:    1
   TDATAROW:_KRM_TIP
     Param   1:    N    80
     Param   2:    C    "S"
     Local   1:    N    80
     Local   2:    U    
     Local   3:    U    
   (b)GET_BORC
     Param   1:    C    "S"
     Local   1:    L    .T.
     Local   2:    L    .F.
     Local   3:    N    80
     Local   4:    C    "S"
     Local   5:    S    
   TDBCOMBO:LOSTFOCUS
     Param   1:    C    "S"
   TDBCOMBO:KILLFOCUS
     Param   1:    N    267836
     Local   1:    S    
   TCONTROL:HANDLEEVENT
     Param   1:    N    267836
     Local   1:    U    
   TDBCOMBO:HANDLEEVENT
     Param   1:    N    8
     Param   2:    N    267836
     Param   3:    N    0
     Local   1:    U    
   _FWH
     Param   1:    N    8
     Param   2:    N    267836
     Param   3:    N    0
   DIALOGBOXINDIRECTW
     Param   1:    N    0
     Param   2:    N    8
     Param   3:    N    267836
     Param   4:    N    0
     Param   5:    N    1050
     Local   1:    O    Class: TDBCOMBO
   TDIALOG:ACTIVATE
     Param   1:    N    655360
     Param   2:    C    "€ È€       ¾ÿâ °     F i v e W i n   f o r   H a r b o u r       P    4  u  µS T A T I C         E r r o r   d e s c r i p t i o n :   E r r o r   B A S E / 3 9     W r i t e   n o t   a l l o w e d :   T D A T A R O W : U Y _ 8 
 
          P      H  ¶S T A T I C   & S t a c k   L i s t        ¡P     ! Ü { ·L I S T B O X          P    a ž   ¸B U T T O N   & Q u i t         P    ¯  /  ¹B U T T O N   S e e   e r r o r . l o g   f i l e     "
     Param   3:    N    398206
     Param   4:    O    Class: TDIALOG
   ERRORDIALOG
     Param   1:    U    
     Param   2:    U    
     Param   3:    B    {|| ... }
     Param   4:    L    .T.
     Param   5:    U    
     Param   6:    L    .T.
     Param   7:    U    
     Param   8:    U    
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    L    .F.
     Param  13:    O    Class: TDIALOG
     Param  14:    U    
     Local   1:    N    398206
     Local   2:    S    
     Local   3:    O    Class: TDIALOG
   (b)ERRORSYS
     Param   1:    O    Class: ERROR
     Local   1:    O    Class: TDIALOG
     Local   2:    O    Class: TLISTBOX
     Local   3:    U    
     Local   4:    U    
     Local   5:    C    "   Called from:  => __ERRRT_SBASE( 0 )"
     Local   6:    N    9
     Local   7:    C    "   Error description: Error BASE/39  Write not allowed: TDATAROW:UY_8
"
     Local   8:    A    Len:   62
     Local   9:    O    Class: TSAY
     Local  10:    N    402987703
     Local  11:    N    1
     Local  12:    C    "Application

Re: BASE/39 Write not allowed in MariaDB

Posted: Tue Jun 02, 2020 10:37 am
by nageswaragunupudi
I will check this.

Re: BASE/39 Write not allowed in MariaDB

Posted: Wed Jun 03, 2020 5:44 pm
by Horizon
Hi Mr. Rao,

I am stuck in here.

Re: BASE/39 Write not allowed in MariaDB

Posted: Sat Jun 06, 2020 5:54 pm
by Horizon
waiting ...

Re: BASE/39 Write not allowed in MariaDB

Posted: Sun Jun 07, 2020 3:03 pm
by nageswaragunupudi
Syntax for SetDefault in TDataRow class

Code: Select all

SetDefault( ncField, uDefault, lCanModify )
If the 3rd parameter is true, then user can modify.
It is false then user can not modify.

Re: BASE/39 Write not allowed in MariaDB

Posted: Sun Jun 07, 2020 4:59 pm
by Horizon
nageswaragunupudi wrote:Syntax for SetDefault in TDataRow class

Code: Select all

SetDefault( ncField, uDefault, lCanModify )
If the 3rd parameter is true, then user can modify.
It is false then user can not modify.
So you say the opposite is working with rowset.