Page 1 of 1

TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 04, 2024 8:20 am
by shrifw
Dear Rao Sir ,

I am getting the error Error BASE/39 Write not allowed: TDATAROW:main_uom_name. I am not able to understand this error. Could you please help me on this.

Code: Select all | Expand

Application
===========
   Path and name: G:\vimcosoft\V9ACC\v9acc.exe (32 bits)
   Size: 5,547,520 bytes
   Compiler version: Harbour 3.2.0dev (r2405310955)
   FiveWin  version: FWH 24.04
   C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
   Windows 10 64 Bits, version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 19 secs 
   Error occurred at: 04/08/2024, 13:49:07
   Error description: Error BASE/39  Write not allowed: TDATAROW:main_uom_name
   Args:
     [   1] = O   TDATAROW

Stack Calls
===========
   Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDATAROW:ERROR( 0 )
   Called from: .\source\classes\datarow.prg => TDATAROW:FIELDPUT( 647 )
   Called from: .\source\classes\datarow.prg => TDATAROW:_MAIN_UOM_NAME( 2563 )
   Called from: G:\vimcosoft\V9ACC\PRGS\m_vibtcrec.prg => (b)ITEMBATCH_REC( 89 )
   Called from: .\source\classes\tget.prg => TGET:DEFAULT( 1663 )
   Called from: .\source\classes\tget.prg => TGET:INITIATE( 1371 )
   Called from: .\source\classes\activex.prg => __OBJSENDMSG( 0 )
   Called from: .\source\function\harbour.prg => OSEND( 293 )
   Called from: .\source\function\harbour.prg => ASEND( 261 )

 
Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 04, 2024 1:11 pm
by nageswaragunupudi
What is this?
_MAIN_UOM_NAME

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 04, 2024 3:07 pm
by shrifw
Dear Rao Sir ,

It is GET Var as shown below , as TDATAROW added underscore "_" prefix ( _MAIN_UOM_NAME ).

The RowSet Query returns a record.

Code: Select all | Expand


oItemRs := oApp:oDBConn:RowSet( T_VITEM_REF_COLS_BY_ID( pnItemId ) )  
oItemRec := TDataRow():New( oItemRs )

....

@   nGetRow,  150  SAY ":" GET aoGETRO[ 5 ] VAR oItemRec:main_uom_name SIZE 200, C_GETH PIXEL OF oWnd ;
    WHEN (.F.)  NOBORDER FONT oApp:oFontGet UPDATE

 
Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 04, 2024 11:29 pm
by nageswaragunupudi
T_VITEM_REF_COLS_BY_ID( pnItemId )
What does this function Return?

Meanwhile please do this small test:
Immediately after opening the rowset, execute:

Code: Select all | Expand

oItemRs:Edit()
and let us know what happens.

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Mon Aug 05, 2024 4:54 pm
by shrifw
Dear Rao Sir ,

oItemRs:Edit() is working fine. But after that as usual same error occurs.

I have tested in FWH 23.10 and it is working FINE. But NOT working in FWH 24.04

Code: Select all | Expand

oItemRs:Edit()

 
Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Mon Aug 05, 2024 11:45 pm
by nageswaragunupudi
I have tested in FWH 23.10 and it is working FINE. But NOT working in FWH 24.04
Is oItemRs:Edit() not working in FWH24.04? What is the error you are getting?

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Wed Aug 14, 2024 4:24 pm
by shrifw
Dear Rao Sir ,

Sorry for the late replying...!!
Is oItemRs:Edit() not working in FWH24.04? What is the error you are getting?


oItemRs:Edit() is working fine in both FWH 23.10 and FWH24.04 version. THE TDATAROW IS NOT WORKING IN VERSION FWH 24.04 BUT IT IS WORKING FINE IN FWH 23.10.

Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sat Aug 17, 2024 2:45 am
by nageswaragunupudi
oItemRs:Edit() is same as TDataRow():New( oItemRs ):Edit()

Please try

Code: Select all | Expand

TDataRow():New( oItemRs ):Edit()
and let us know.

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sat Aug 17, 2024 2:55 am
by nageswaragunupudi
In this code

Code: Select all | Expand

@   nGetRow,  150  SAY ":" GET aoGETRO[ 5 ] VAR oItemRec:main_uom_name SIZE 200, C_GETH PIXEL OF oWnd ;
    WHEN (.F.)  NOBORDER FONT oApp:oFontGet UPDATE
Please do not use WHEN clause. Use READONLY clause
Like this:

Code: Select all | Expand

@   nGetRow,  150  SAY ":" GET aoGETRO[ 5 ] VAR oItemRec:main_uom_name READONLY ;
SIZE 200, C_GETH PIXEL OF oWnd ;
   NOBORDER FONT oApp:oFontGet UPDATE

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 18, 2024 4:15 pm
by shrifw
Dear Rao Sir ,

Yes..! , Both Function are working fine. I had overlooked. I tried to change GET with READONLY. But still the error is exists.
oItemRs:Edit() is same as TDataRow():New( oItemRs ):Edit()

TDataRow():New( oItemRs ):Edit()
Error :

Code: Select all | Expand

Application
===========
   Path and name: G:\vimcosoft\V9ACC\v9acc.exe (32 bits)
   Size: 5,549,568 bytes
   Compiler version: Harbour 3.2.0dev (r2405310955)
   FiveWin  version: FWH 24.04
   C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
   Windows 10 64 Bits, version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 7 secs 
   Error occurred at: 18/08/2024, 21:42:23
   Error description: Error BASE/39  Write not allowed: TDATAROW:itemgrp_name
   Args:
     [   1] = O   TDATAROW

Stack Calls
===========
   Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
   Called from: ../../../tobject.prg => TDATAROW:ERROR( 0 )
   Called from: .\source\classes\datarow.prg => TDATAROW:FIELDPUT( 647 )
   Called from: .\source\classes\datarow.prg => TDATAROW:_ITEMGRP_NAME( 2563 )
   Called from: G:\vimcosoft\V9ACC\PRGS\m_vibtcrec.prg => (b)ITEMBATCH_REC( 86 )
   Called from: .\source\classes\tget.prg => TGET:DEFAULT( 1663 )
 
Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Aug 18, 2024 4:52 pm
by nageswaragunupudi
Yes..! , Both Function are working fine
TDataRow method Edit() automatically creates Gets for all datas and that is working fine.
Are you able to see the Get for the data itemgrp_name also?

This method automatically recognizes if a data is readonly and then creates the Get suitably.
When these automatically generated Gets are working, the Get you are creating manually is not working.

Please recheck your code.

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Sun Oct 27, 2024 3:23 pm
by shrifw
Dear Rao Sir ,

I apologize resuming to this topic very late. May I request you to help on this.

Thanks
Shridhar

Re: TDATAROW ERROR : Error BASE/39 Write not allowed

Posted: Mon Oct 28, 2024 4:43 am
by nageswaragunupudi
I will be able to help better if we both work on the same sample, so that I can build and check at my end.

I suggest this:

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   local oCn, oRs, cSql

   oCn   := maria_Connect( "208.91.198.197:3306,fwhdemo,gnraofwh,Bharat@1950", .t. )
   oCn:lShowErrors := .t.

//
TEXT INTO cSql
SELECT C.ID, C.City, C.State, S.name AS StateName, C.Salary
 FROM customer C LEFT JOIN states S ON C.state = S.code
 WHERE C.ID < 101
ENDTEXT
//
   oRs   := oCn:RowSet( cSql )
   if oRs != nil

// In this Rowset, fields ID and STATEMANE are readonly
// Please build your TDataRow Edit code here
// reproduing the error

      oRs:Close()

   endif
   oCn:Close()
   
return nil
and test it at your end
I will also test at my end.
Then it is easy for me to provide support