Page 1 of 1

DCBROWSE HELP

Posted: Wed Jan 17, 2024 1:18 pm
by jezda
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
Screenshot_1.png (10.15 KiB) Viewed 1646 times
After that, when I filter the same or other data again, the same data appears multiple times in the browse object
Screenshot_2.png
Screenshot_2.png (9.76 KiB) Viewed 1646 times

Re: DCBROWSE HELP

Posted: Thu Jan 18, 2024 2:02 am
by k-insis
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)

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

Posted: Thu Jan 18, 2024 5:38 am
by jezda
Problem solved, thank you very much...