Page 1 of 1

ERROR -> DataRow Write Not Allowed for JOINED table's Columns

Posted: Sun Sep 14, 2025 2:34 pm
by shri_fwh
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.

Code: Select all | Expand

 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


Code: Select all | Expand

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 )


Re: ERROR -> DataRow Write Not Allowed for JOINED table's Columns

Posted: Sun Sep 14, 2025 4:31 pm
by Antonio Linares
Please try this:

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

Re: ERROR -> DataRow Write Not Allowed for JOINED table's Columns

Posted: Mon Sep 15, 2025 11:41 am
by vilian
In this case, With FWHMySql, you can create the datarow with EditBaseRecord.

oTMRow := oTMRs:EditBaseRecord(NIL,.T.)