Page 1 of 1

Refresh Browser with DC_SQLFieldblock

Posted: Wed Aug 11, 2010 12:04 pm
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

Re: Refresh Browser with DC_SQLFieldblock

Posted: Wed Aug 11, 2010 3:50 pm
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.

Re: Refresh Browser with DC_SQLFieldblock

Posted: Thu Aug 12, 2010 1:00 am
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

Re: Refresh Browser with DC_SQLFieldblock

Posted: Tue Sep 21, 2010 1:31 pm
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