Hello everybody
I started developing software using MySQL as a database...
It mostly works well but there is a problem with displaying data in DCBROWSE...
When I first filter the data (before the create a browse object), everything is ok
cQuery:="SELECT * FROM dbo WHERE id = 1"
oTbl := MyResult():New(oCon,cQuery)
@ 9.5,.5 DCBROWSE oBrowse PARENT oTab1Static DATA oTbl;
HEADLINES 1 ;
SIZE 80.5,5.5 .......
DCBROWSECOL FIELD oTbl_dbo:name;
;//DCBROWSECOL DATA {|| oTbl:FieldGet('name') };
WIDTH 58 ;
HEADER "Naziv dokumenta" PARENT oBrowse
After that, when I filter the same or other data again, the same data appears multiple times in the browse object
DCBROWSE HELP
Re: DCBROWSE HELP
By "when I filter same data again" you mean - make new select with changed query and want to display it?
With sqlexpress this might solve:
//tell browser there is new data (dataset or cursor)
obrowse:DataLink := dbNewData
obrowse:dataSource := dbNewData
//fully refresh everything on screen
DC_GetRefresh(GetLIst)
dbNewData:GoTop()
oBrowse:gotop()
oBrowse:refreshall()
SetAppFocus(oBrowse)
With sqlexpress this might solve:
//tell browser there is new data (dataset or cursor)
obrowse:DataLink := dbNewData
obrowse:dataSource := dbNewData
//fully refresh everything on screen
DC_GetRefresh(GetLIst)
dbNewData:GoTop()
oBrowse:gotop()
oBrowse:refreshall()
SetAppFocus(oBrowse)
jezda wrote: ↑Wed Jan 17, 2024 1:18 pm Hello everybody
I started developing software using MySQL as a database...
It mostly works well but there is a problem with displaying data in DCBROWSE...
When I first filter the data (before the create a browse object), everything is ok
cQuery:="SELECT * FROM dbo WHERE id = 1"
oTbl := MyResult():New(oCon,cQuery)
@ 9.5,.5 DCBROWSE oBrowse PARENT oTab1Static DATA oTbl;
HEADLINES 1 ;
SIZE 80.5,5.5 .......
DCBROWSECOL FIELD oTbl_dbo:name;
;//DCBROWSECOL DATA {|| oTbl:FieldGet('name') };
WIDTH 58 ;
HEADER "Naziv dokumenta" PARENT oBrowse
Screenshot_1.png
After that, when I filter the same or other data again, the same data appears multiple times in the browse object
Screenshot_2.png
Re: DCBROWSE HELP
Problem solved, thank you very much...