FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TDATAROW ERROR : Error BASE/39 Write not allowed
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 04, 2024 08:20 AM
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 (fw): Select all Collapse
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 04, 2024 01:11 PM

What is this?

_MAIN_UOM_NAME

Regards



G. N. Rao.

Hyderabad, India
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 04, 2024 03:07 PM
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 (fw): Select all Collapse
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 04, 2024 11:29 PM
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 (fw): Select all Collapse
oItemRs:Edit()
and let us know what happens.
Regards



G. N. Rao.

Hyderabad, India
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Mon Aug 05, 2024 04:54 PM
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 (fw): Select all Collapse
oItemRs:Edit()
Thanks
Shridhar
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Mon Aug 05, 2024 11:45 PM
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?
Regards



G. N. Rao.

Hyderabad, India
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Wed Aug 14, 2024 04:24 PM
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sat Aug 17, 2024 02:45 AM
oItemRs:Edit() is same as TDataRow():New( oItemRs ):Edit()

Please try
Code (fw): Select all Collapse
TDataRow():New( oItemRs ):Edit()
and let us know.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sat Aug 17, 2024 02:55 AM
In this code
Code (fw): Select all Collapse
@   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 (fw): Select all Collapse
@   nGetRow,  150  SAY ":" GET aoGETRO[ 5 ] VAR oItemRec:main_uom_name READONLY ;
SIZE 200, C_GETH PIXEL OF oWnd ;
   NOBORDER FONT oApp:oFontGet UPDATE
Regards



G. N. Rao.

Hyderabad, India
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 18, 2024 04:15 PM
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 (fw): Select all Collapse
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Aug 18, 2024 04:52 PM
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.
Regards



G. N. Rao.

Hyderabad, India
Posts: 76
Joined: Fri Aug 28, 2009 05:25 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Sun Oct 27, 2024 03:23 PM

Dear Rao Sir ,

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

Thanks

Shridhar

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDATAROW ERROR : Error BASE/39 Write not allowed
Posted: Mon Oct 28, 2024 04:43 AM
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 (fw): Select all Collapse
#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
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion