FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ERROR -> DataRow Write Not Allowed for JOINED table's Columns
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
ERROR -> DataRow Write Not Allowed for JOINED table's Columns
Posted: Sun Sep 14, 2025 02:34 PM
Dear Antonio ,

I am getting below error while editing TDataRow record's value in GET control. But the BASE table columns are allowed to write the values in GET control. Could you please let me know whether it is valied assign values to JOIN table's columns values as the values are copied to Array of TDataRow class. Please guide me.
 csql := ;
 " SELECT t.* ," + ;
                                           " ts.tts_name " + ;
                                           " FROM vtm t " + ;
                                           " INNER JOIN vtts ts ON ts.cfy_id = t.cfy_id AND ts.tts_id = t.tts_id  WHERE t.tran_id = 1 " + ;
                                           
   oTMRs  := oApp:oDBConn:RowSet(csql )  
   oTMRow := TDataRow():New( oTMRs )
   oTMRow:Load(.T.)


   // ERROR GETTING AS tt_name belong other table    
   @   nGetRow,  130  SAY ":" GET aoGET[ 1 ] VAR oTMRow:tts_name SIZE 200, C_GETH PIXEL OF oWnd ;
    NOBORDER FONT oApp:oFontGet UPDATE
Application
===========
   Path and name: D:\vimcosoft\V9ACC\v9acc.exe (32 bits)
   Size: 5,558,272 bytes
   Compiler version: Harbour 3.2.0dev (r2405310955)
   FiveWin  version: FWH 24.04
   C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
   Windows 11 64 Bits, version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 8 secs 
   Error occurred at: 14-09-2025, 20:28:46
   Error description: Error BASE/39  Write not allowed: TDATAROW:tts_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:_TTS_NAME( 2563 )
   Called from: D:\vimcosoft\V9ACC\PRGS\txn_contra.prg => (b)TXNCONTRA( 32 )
   Called from: .\source\classes\tget.prg => (b)TGET( 326 )
   Called from: .\source\classes\tget.prg => TGET:VARPUT( 0 )
   Called from: .\source\classes\tget.prg => (b)TGET( 193 )
   Called from: .\source\classes\tget.prg => TGET:ASSIGN( 0 )
   Called from: .\source\classes\tget.prg => TGET:LOSTFOCUS( 2496 )
   Called from: .\source\classes\control.prg => TGET:KILLFOCUS( 1196 )
   Called from: .\source\classes\control.prg => TCONTROL:HANDLEEVENT( 1840 )
   Called from: .\source\classes\tget.prg => TGET:HANDLEEVENT( 1328 )
   Called from: .\source\classes\window.prg => _FWH( 3654 )
   Called from: .\source\classes\dialog.prg => DIALOGBOXINDIRECTW( 0 )
   Called from: .\source\classes\dialog.prg => TDIALOG:ACTIVATE( 309 )
   Called from: .\source\function\errsysw.prg => ERRORDIALOG( 448 )
   Called from: .\source\function\errsysw.prg => (b)ERRORSYS( 24 )
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ERROR -> DataRow Write Not Allowed for JOINED table's Columns
Posted: Sun Sep 14, 2025 04:31 PM

Please try this:

oTMRow:Load(.T.)

oTMRow:FieldReadOnly( "tts_name", .F. )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: ERROR -> DataRow Write Not Allowed for JOINED table's Columns
Posted: Mon Sep 15, 2025 11:41 AM

In this case, With FWHMySql, you can create the datarow with EditBaseRecord.

 oTMRow := oTMRs:EditBaseRecord(NIL,.T.)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil

Continue the discussion