IF I create a rowset where I use ORDER or LIMIT EditSource() Is not working. I think it's doing wrong changes in my sql statement. Please look at this little code:
Code: Select all
oRs := oBD:QUERY("SELECT * FROM tipos AS tip ORDER BY ctipo LIMIT 1000")
oRs:bEdit := { |oRec| ManTab( oRec,"M") }
oBrw:EditSource( .t. )
IF I remove clausules ORDER and LIMIT everything is fine. Could you help me ?04/06/2020 13:45:05: FWMARIACONNECTION:EXECUTE_SQL( 6163 ) cCallStack( "<-", 3 ) = "FWMARIACONNECTION:EXECUTE( 6453 )<-FWMARIAROWSET:RESYNC( 3757 )<-FWMARIAROWSET:ROWGET( 4971 )<-TDATAROW:READOBJ( 943 )<-TDATAROW:LOAD( 251 )<-TDATAROW:NEW( 196 )<-FWMARIAROWSET:DATAROW( 5056 )<-(b)FWMARIAROWSET_SETXBROWSE( 5068 )<-TXBROWSE:DATAROW( 10680 )<-TXBROWSE:EDIT( 10723 )<-(b)TXBROWSE( 753 )<-TXBROWSE:EDITSOURCE( 0 )<-(b)VFAMANARQ( 141 )<-TBUTTONBMP:CLICK( 179 )<-TBUTTON:HANDLEEVENT( 1755 )<-TBUTTONBMP:HANDLEEVENT( 261 )<-_FWH( 3546 )<-SENDMESSAGE( 0 )<-TDIALOG:COMMAND( 425 )<-TWINDOW:HANDLEEVENT( 0 )<-TDIALOG:HANDLEEVENT( 923 )<-DIALOGBOX( 0 )<-TDIALOG:ACTIVATE( 305 )<-VFAMANARQ( 151 )<-CHAMAPRG( 53 )<-(b)FAZMENUMOD( 389 )<-TMENU:ACTIVATE( 1595 )<-(b)DEFBTNBARSIS( 171 )<-TRBTN:CLICK( 717 )<-TRBTN:LBUTTONUP( 893 )<-TCONTROL:HANDLEEVENT( 1791 )<-TRBTN:HANDLEEVENT( 1575 )<-_FWH( 3546 )<-WINRUN( 0 )<-TMDIFRAME:ACTIVATE( 1078 )<-START( 96 )" cSql = "SELECT * FROM tipos as TIP ORDER BY CTIPO LIMIT 1000 WHERE `TIP`.`CTIPO` = '01'" uRet = ::nError = 1064 ::cError = "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `TIP`.`CTIPO` = '01'' at line 1" ::cSqlInfo = ""