Refresh Browser with DC_SQLFieldblock

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Refresh Browser with DC_SQLFieldblock

#1 Post by c-tec »

Hello,
I am using sqlexpress and eXpress++ for browsing SQL tables.
How can I refresh the content of the browser after changing the value of a field ? oBrowse:refreshall() or dc_getrefresh() does not work in this case.

This ist the browser line
DCBROWSECOL DATA DC_SQLFieldBlock( oCursor, 'id' ) WIDTH 8 HEADER 'ID'

This is my update function:
oCursor:fieldput("id",999)
oCursor:updaterow()
if oCursor:rowsupdated = SQL_XPP_ERROR
// error
endif

regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Refresh Browser with DC_SQLFieldblock

#2 Post by rdonnay »

I am surprised that the browse is not updated with a :refreshAll().
I have not used SQLexpress in quite a few years and don't even have a test program available to debug this.

I suggest posting this question on Boris Borzic's newsgroup.
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Refresh Browser with DC_SQLFieldblock

#3 Post by c-tec »

Hello Roger,
sorry, was my failure, it works with obrowse:refreshall().
Your sqlexpress implementatio in eXpress++ is very helpful, I use it in some applications without problems. The only nice thing would be a browser, that can fetch columns intelligent in the background for large datasets. This looks complicated, maybe Arctica can handle this. But any idea would be appreciated, then I would have the perfect solution because sqlexpress can handle not only Posgres. I am using it very often with MySQL and here Arctica cannot help.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
bborzic
Posts: 21
Joined: Tue Sep 21, 2010 12:39 pm
Contact:

Re: Refresh Browser with DC_SQLFieldblock

#4 Post by bborzic »

c-tec wrote:Hello Roger,
Your sqlexpress implementatio in eXpress++ is very helpful, I use it in some applications without problems. The only nice thing would be a browser, that can fetch columns intelligent in the background for large datasets.
Rudolf
SQLDataSet already provides support for fetching data in a background thread, see following method:

b]:ExecuteAsync() -> nSuccess[/b]
Fetch data from server into client side cursor using a background thread. The method returns as soon as the background thread is started, allowing the main thread to continue and possibly display a partial result set to the user. By default, the background thread will run at a low priority, however this can be changed at any time using the :AsyncPriority method. Progress of the background thread may be monitored by other threads using the :RecCount() method. As more data is fetched, the RecCount will increase. Once the entire result set is fetched, the :isFinished property will be set to .T.


For an example, see SQLBRO.PRG included with SQLExpress.

Regards,
Boris Borzic
http://xb2.net
http://sqlexpress.net
industrial strength Xbase++ development tools
Regards,
Boris Borzic
http://xb2.net
http://sqlexpress.net
industrial strength Xbase++ development tools

Post Reply