topic
stringlengths
1
63
text
stringlengths
1
577k
xBrowse & SELECT parameter
Thanks Mr. Rao Regards, Euclides
xBrowse & SELECT parameter
[quote="nageswaragunupudi":1dfrcbt1]For your information, class TDataRow is created to be used in the place of scatter/gather logic, but this class is robust and safer. We can also address the fieldnames as oRec:fieldname. TDataRow works with DBF, TDatabase, ADO Recordset, TRecSet, DolphinQry exactly the same way.[/quote:1dfrcbt1] Nice for info Dear Rao, Any link / working small example, please
xBrowse & SQLRDD
Hi, Cant remember if I've asked this question before <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> Is there any way that the method of selecting multiple records (shift & click) be made available for use with SQLRDD? I think I remember reading somewhere that the select routine uses functions not available in SQL but I was wondering if there was another way of doing it in xBrowse? Might be a question for nageswaragunupudi? Best regards, Pete
xBrowse & SQLRDD
Have you tried setting marqueestyle to MARQSTYLE_HIGHLROWMS ?
xBrowse & SQLRDD
Yes, thats the style i'm using
xBrowse & SQLRDD
[quote="PeterHarmes":21e153ye]Yes, thats the style i'm using[/quote:21e153ye] If so it SQLRDD also should work like any other RDD.
xBrowse & SQLRDD
I'm sure I read somewhere that certain index functions are not available in SQLRDD - I think they were the ones that return the position of the record within the index - Is this function being used in xBrowse?
xBrowse & SQLRDD
For the purpose of multi-select feature it is enough if RecNo() is working correctly. As I can not test SQLRDD at my end, please explain what is happening in your case.
xBrowse & SQLRDD
No records are selected when i use the shift key to select multiple records (using mouse) The ctrl key is working fine by selecting records line at a time.
xBrowse & SQLRDD
I'm sorry, I've made a mistake - I forgot to remove my modified xBrowse.prg from my build routines. It looks like you can now select multiple rows with the space bar under SQLRDD. Sorry for wasting your time <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> p.s. this wasnt working with earlier versions of xBrowse, is this the modification that was made in the July release? * Enhancement: XBrowse: Method SetRDD() modified to make compatible with SQLRDD.
xBrowse & SQLRDD
[quote="PeterHarmes":hc3pl0k3]I'm sorry, I've made a mistake - I forgot to remove my modified xBrowse.prg from my build routines. It looks like you can now select multiple rows with the space bar under SQLRDD. Sorry for wasting your time <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> p.s. this wasnt working with earlier versions of xBrowse, is this the modification that was made in the July release? * Enhancement: XBrowse: Method SetRDD() modified to make compatible with SQLRDD.[/quote:hc3pl0k3] Yes. Whatever modifications we made were based on what we could understand from your postings here. Hope xbrowse is now working as expected for you.
xBrowse & SQLRDD
Hi, Just found a problem with xBrowse & SQLRDD incremental searching no longer works - I have found the area that is causing the problem: Line 3855 of xBrowse.prg (METHOD SetRdd) [code=fw:3ifqbbhz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"SQLRDD"</span><br />      ::<span style="color: #000000;">bSeek</span>        := <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">cSortOrders</span>  := <span style="color: #00C800;">nil</span><br />      ::<span style="color: #000000;">cOrdBags</span>     := <span style="color: #00C800;">nil</span><br />   <span style="color: #00C800;">endif</span><br /><br /> </div>[/code:3ifqbbhz] If I remove this block, incremental searching works fine. Any ideas why this was put in here? Regards, Pete
xBrowse & SQLRDD
[quote:1rcd9tpo]Any ideas why this was put in here?[/quote:1rcd9tpo] Because we were not sure about the existence/functionality of some Ord???() functions in SQLRDD. We preferred not to use such functions rather than creating run-time errors. With your help we shall try to implement this functionality. Please make the change as you prposed above and let us know if all your browses are working prperly with incremental seek and incremental filters. We shall implement the final changes in the next release.
xBrowse & SQLRDD
I've yet to test the incremental filters - this sounds really useful, but as far as I have tested, the incremental searching works fine with this block commented out.
xBrowse & SQLRDD
Just been testing selecting multiple rows with the shift key under SQLRDD and sometimes it does not select the correct records - it seems to select all the records in the browse on the current view except the records i was expecting. Also, if i keep selecting records with shift, clearing the list and re-selecting after 4 or 5 times of doing this, an egg timer appears and the app hangs. If you want to give me a modified xbrowse with debug statements I can test and report the findings to you. Best regards, Pete
xBrowse & SQLRDD
Please insert debug statements at places you think appropriate in the METHOD Select()
xBrowse & SQLRDD
I think the problem is due to ::bKeyNo Under DBFCDX it uses OrdKeyNo() which is perfect - I think this function does not work under SQLRDD <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Under SQLRDD it eventually uses Recno() which would be fine if you browse was sorted by record number. If you select the first record, then hold shift and select another record below the first record with a lower Recno(), it gets totally confused. The only way that I can see this potentially working is if you use the index key instead of Recno()/OrdKeyNo(), but even then this would only work if the index contained unique keys. Can you explain how bBookmark works and what its used for? Best regards, Pete
xBrowse & SQLRDD
If you are using the latest XBrowse, for SQLRDD, we are using RecNo() and DbGoTo() functions only both for bBookMark and bKeyNo(). We are not using OrdKeyNo(). We expect SQLRDD to be perfectly reliable with RecNo() and GoTo() functions even if used in quick succession many times.
xBrowse & SQLRDD
But doesnt that mean that the browse must be in recno() order? I might be reading the select method wrong, but doesnt it skip(-1) if the recno() of the second record selected with the shift is less than the 1st?
xBrowse & SQLRDD
I've modified the select routine, but this only works if the index is indexed on a unique key: See the section where nOperation == 3 [code=fw:70gyofd1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> nOperation <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> uBook, uCurRow, uOldRow, uTemp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aTemp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nAt, nLen<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> lRefresh<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cStIndexKey &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cEndIndexKey := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> .not. ::<span style="color: #000000;">lMultiSelect</span> <span style="color: #B900B9;">// ::nMarqueeStyle != MARQSTYLE_HIGHLROWMS .and. ::nMarqueeStyle != MARQSTYLE_HIGHLWIN7</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nOperation := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == &nbsp; <span style="color: #000000;">0</span> <span style="color: #B900B9;">// delete all</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span> .and. &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span> == ::<span style="color: #000000;">aSelected</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRefresh := .f.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRefresh := .t.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aSelected</span> &nbsp; := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nSaveMarq</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nMarqueeStyle</span> &nbsp; := ::<span style="color: #000000;">nSaveMarq</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">nSaveMarq</span> &nbsp; &nbsp; &nbsp; := <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> lRefresh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ::lRefreshOnlyData := .t.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// ::Paint()</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">1</span> .or. <span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span> .and. nOperation != <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span><span style="color: #B900B9;">// Add current</span><br />&nbsp; &nbsp; &nbsp; uBook := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nAt &nbsp; := Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nAt == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">2</span> <span style="color: #B900B9;">// Swap key (Ctrl+LClick)</span><br />&nbsp; &nbsp; &nbsp; uBook := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nAt &nbsp; := Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nAt > <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aSelected</span><span style="color: #000000;">&#91;</span> nAt <span style="color: #000000;">&#93;</span> := Atail<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Asize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">3</span> <span style="color: #B900B9;">// Shift & lclick</span><br />&nbsp; &nbsp;&nbsp; &nbsp;cEndIndexKey := &<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>IndexKey<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uBook &nbsp; := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uCurRow := ::<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, &nbsp;Atail<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uOldRow := ::<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cStIndexKey := &<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>IndexKey<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> uOldRow != uCurRow<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aSelected</span> := <span style="color: #000000;">&#123;</span> Atail<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"SQLRDD"</span>, cEndIndexKey > cStIndexKey, uCurRow > uOldRow<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> uTemp := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != uBook .and. ! ::<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Eval( ::bSkip, 1 )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> uTemp := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != uBook .and. ! ::<span style="color: #000000;">Bof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Eval( ::bSkip, -1 )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ::lRefreshOnlyData := .t.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">4</span> <span style="color: #B900B9;">// Select all</span><br />&nbsp; &nbsp; &nbsp; uBook &nbsp; &nbsp; &nbsp; := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">aSelected</span> := Array<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">KeyCount</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nAt &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; nLen &nbsp; &nbsp; &nbsp; &nbsp;:= ::<span style="color: #000000;">nLen</span><br />&nbsp; &nbsp; &nbsp; aTemp &nbsp; &nbsp; &nbsp; := ::<span style="color: #000000;">aSelected</span><br />&nbsp; &nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bGotop</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> nAt <= nLen <span style="color: #B900B9;">//.and. !Eval( ::bEof )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;aTemp<span style="color: #000000;">&#91;</span> nAt++ <span style="color: #000000;">&#93;</span> := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//Eval( ::bSkip, 1 )</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// ::lRefreshOnlyData := .t.</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">5</span> <span style="color: #B900B9;">// Swap key (Shift + GoDown or GoUp)</span><br />&nbsp; &nbsp; &nbsp; uCurRow := ::<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nAt &nbsp; &nbsp; := Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uCurRow <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uBook &nbsp; := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> nAt == <span style="color: #000000;">1</span> .and. len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; elseif nAt == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> nAt != len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Asize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;end <span style="color: #00C800;">case</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:70gyofd1]
xBrowse & SQLRDD
Eval( oBrw:bBookMark ) returns the RecNo() Eval( oBrw:bBookMark, n ) executes( DBGOTO( n ), RECNO() ) [quote:31c3adjn]But doesnt that mean that the browse must be in recno() order? [/quote:31c3adjn] Yes. Any problem?
xBrowse & SQLRDD
I would say that was a pretty big problem wouldnt you?
xBrowse & SQLRDD
XBrowse needs to know the following: What are the functions for: 1. GoTop 2. GoBottom 3. Skip n Rows 4. What is the function to know the row number in natural order ( this is normally RecNo() in RDDs ) 5. What is the function which xBrowse can use to go to the row number in natural order. ( This is normally DBGOTO( n ) ) 6. If you can order the rows in any other other than the natural order:- (a) What is the function to know the serial number of the row in that order? ( in many RDD;s this OrdKeyNo() ) and (b) What is the function XBrowse can use to position to a partiual serial number in an ordered table. ( in many RDDs this is OrdKeyGoTo( n ) ) 7. What is the function to know the total number of records? Now, if you let me know what are the functions SQLRDD provides for 6(a) and 6(b) then we can make the codeblocks when the table is not in natural order.
xBrowse & SQLRDD
This is the problem I think, those functions are not available under SQLRDD. The changes you have made in the recent version for SQLRDD are nearly perfect so I think they can stay in xBrowse, it's just the part where it checks if the second click is higher or lower in the list is the problem. The only work around I can see is the change I made a few posts earlier. This would suit my needs as I would ensure that my index contain unique keys. I think we cant go any further without OrdKeyNo() functions, so I dont mind making those minor changes I made in the earlier post each time I update FW, unless other SQLRDD users require these changes and maybe we can incorporate it in somehow? What do you think? Best regards, Pete (Thank you for your time in looking at this problem - we have always told our SQL customers that shift selecting was not possible and they have accepted this, so the work you have done and the change I made will be appreciated by our users)
xBrowse & SQLRDD
Still I don't like you to give up. I agree I do not about SQLRDD but if you look around you may find the answers.
xBrowse & SQLRDD
I can remember seeing on the SQLRDD forum someone asking if these functions were available and was told that it would be impossible make these work - I may ask the question again to see if they've had an idea how to implement this. For me, it's not giving up, shift & select now works with SQLRDD in an xbrowse in my application (selfish I know) I will let you know if I get any reply from xHarbour about the functions. Thanks Pete
xBrowse & SQLRDD
Using ADO, OrdKey() can be replaced by oRs:AbsolutePosition and OrdKeyGoTo( n ) by oRs:AbsolutePosition = n. I don't know if it can be of any help. EMG
xBrowse & SQLRDD
I have posted a message so lets see if xHarbour.com are helpfull!
xBrowse & SQLRDD
[quote="Enrico Maria Giordano":w0l3dpc3]Using ADO, OrdKey() can be replaced by oRs:AbsolutePosition and OrdKeyGoTo( n ) by oRs:AbsolutePosition = n. I don't know if it can be of any help. EMG[/quote:w0l3dpc3] You are right. That is how XBrowse's SetAdo() works. But I think SQLRDD does not use ADO. Instead it uses the native libraries of the respective RDMS. I also do not *think* SQLRDD does sorting of any datasets/recordsets in memory, like ADO does. Instead I *guess* it may be reading from the source again with appropriate "ORDER BY <sortcolumn>" clause. I may be wrong. But if my guess is correct, the table view should always be in the order or RecNo().
xBrowse & SQLRDD
Hi I try "bBookMark" and is not stable, when I browse the list items I repeat, my customers complain that the application is confusing, I'm just excuses, I hope that at some point has a solution. [code=fw:2hlfi0vv]<div class="fw" id="{CB}" style="font-family: monospace;">oxBrw:<span style="color: #000000;">bKeyNo</span> = oxBrw:<span style="color: #000000;">bBookMark</span></div>[/code:2hlfi0vv] In fact, I followed the post by Peter both here and in xHarbour. On both sides are said to be 100% compatible and is not so, what I see is that they are solid products that are complementary and should work more closely is this type of case. I think everyone benefits: FWH, SQLRDD of xHarbour.com, like us who buy your products. Regards
xBrowse & SQLRDD
Unfortunately, I've found more problems - If I browse a SQL table that i've put a scope on, the browse displays the first record at the bottom of the browse and looks like there are 2 selected records. If I page up/page down, the browse resets and looks good. If i then move the mouse cursor outside of the browse, the browse corrupts again (first record at the bottom of the browse). I never had these problems with the previous version of xbrowse I used (10.06) Any ideas where I can start to look to see where this problem has come from? Regards, Pete
xBrowse & SQLRDD
If I comment out the SQLRDD section of the SETRDD method, it fixes the duplicate record problem I reported in my last post, however if I move my mouse outside of the browse, the current selected record jumps to the top of the browse. I can confirm that this is a SQLRDD only problem, I ran the same code on a DBF and it works fine. So it seems as if there is a section of the code that needs commenting out for SQLRDD??? *UPDATE* I think the problem is the MouseLeave Method, If I make the following changes, it seems to work: [code=fw:37nxb6za]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lPressed</span> = .f.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <> <span style="color: #ff0000;">"SQLRDD"</span><br />&nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:37nxb6za] I'm going to try and get the shift key selection workig with SQLRDD and I will post my solution (if it works) <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse & SQLRDD
**UPDATE** This is to fix the shift & left-click to select multiple records under SQLRDD [code=fw:950lodyx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">case</span> nOperation == <span style="color: #000000;">3</span> <span style="color: #B900B9;">// Shift & lclick</span><br />&nbsp; &nbsp;&nbsp; &nbsp;cEndIndexKey := &<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>IndexKey<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; uBook &nbsp; := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"SQLRDD"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; uCurRow := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; uCurRow := ::<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, &nbsp;Atail<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"SQLRDD"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; uOldRow := <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>RecNo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; uOldRow := ::<span style="color: #000000;">KeyNo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; cStIndexKey := &<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>IndexKey<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> uOldRow != uCurRow<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">aSelected</span> := <span style="color: #000000;">&#123;</span> Atail<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">"SQLRDD"</span>, cEndIndexKey > cStIndexKey, uCurRow > uOldRow<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> uTemp := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != uBook .and. ! ::<span style="color: #000000;">Eof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">Endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Eval( ::bSkip, 1 )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorWait<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> <span style="color: #000000;">&#40;</span> uTemp := Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != uBook .and. ! ::<span style="color: #000000;">Bof</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">If</span> Ascan<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uTemp <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">-1</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Eval( ::bSkip, -1 )</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">enddo</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CursorArrow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Aadd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSelected</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ::lRefreshOnlyData := .t.</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Eval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">bBookMark</span>, uBook <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />&nbsp;</div>[/code:950lodyx] Will this code be considered for future versions of FW or will I need to make these changes each time? I have bound the code with SQLRDD conditions, so hopefully it wont effect 95% of other users. If this code is to be considered, can someone review my other post I made last week : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=22589">viewtopic.php?f=3&t=22589</a><!-- l --> If someone would like me to email my complete xbrowse.prg, then let me know. Regards, Pete
xBrowse & SQLRDD
Please continue with your fixes and we shall consider all of them later.
xBrowse & SQLRDD
I will release my software to a few of our SQL customers and see if we get any problems. If all ok, I can email you my xBrowse.prg Regards, Pete
xBrowse & SQLRDD
Please note that (::cAlias)->( RecNo() ) is exaactly the same as Eval( ::bBookMark ) or ::BookMark. Instead of saying uCurRow := ( ::cAlias )->( RecNo() ), we rather code as uCurRow := ::BookMark or uCurRow := Eval( ::bBookMark ), which is already done. In other words uBook is exactly your uCurRow. What does IndexKey() return? In other RDDs it is same as OrdKey() and returns the index expression of the current order. How does that help you here? Please let me know. Please also keep in mind that except in the Set??? methods, column Adjust methods and Sort methods, the xbrowse code is totally independent of the data source. The code is the same whether the datasource is RDD, array, recset or any other. We need to stick to this convention while making any modifications in the xbrowse.
xBrowse & SQLRDD
[quote:2bzwzish] Please note that (::cAlias)->( RecNo() ) is exaactly the same as Eval( ::bBookMark ) or ::BookMark. Instead of saying uCurRow := ( ::cAlias )->( RecNo() ), we rather code as uCurRow := ::BookMark or uCurRow := Eval( ::bBookMark ), which is already done. In other words uBook is exactly your uCurRow. [/quote:2bzwzish] When I used Bookmark as the recno, I had some corruptions in the browse when browsing a scoped table (the first record would appear at the bottom of the list) Taking the SQLRDD section out of the SETRDD method fixes these problems. [quote:2bzwzish] What does IndexKey() return? In other RDDs it is same as OrdKey() and returns the index expression of the current order. How does that help you here? Please let me know. [/quote:2bzwzish] I've used Indexkey to know if the previous record (where you first clicked and held the shift key) is higher or lower in the list to the second click. This then tells the system to either Dbskip() or Dbskip(-1) to the last record (this is also why I use Recno() instead of bookmark as OrdKey() doesnt work in SQLRDD) - As I said earlier, the only problem would be if you dont use a record with unique keys in the current index but this could be a condition of using this method. If you need to see an xbrowse working on SQLRDD, I can show you if you want to log onto my machine. Best Regards, Pete
xBrowse & SQLRDD
Just testing xBrowse again and my change to the method MouseLeave blows up, think it should be: [code=fw:3dnb9uly]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> MouseLeave<span style="color: #000000;">&#40;</span> nRow, nCol, nFlags <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br />   ::<span style="color: #000000;">lPressed</span> = .f.<br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> .OR. <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> RddName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <> <span style="color: #ff0000;">"SQLRDD"</span><br />       ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:3dnb9uly]
xBrowse & SQLRDD
Hi Peter I implemented the changes you suggested in xBrowse and stabilized much. What version of FWH are using?, I was wanting to upgrade, but I think I will end my applications with version 10.10 Since that time vere after the jump. Regards
xBrowse & SQLRDD
Hi Oscar, I'm using FWH version 11.09 which I think is the most compatible version for a while with SQLRDD & xHarbour Commercial Regards, Pete
xBrowse & SQLRDD
Hi Peter, Are you using SQLRDD with laetst FWH version?. Thanks.
xBrowse & SQLRDD
No, I'm currently using the September 2011 version of FWH.
xBrowse & SQLRDD
And which version of SQLRDD are you using?. Thanks.
xBrowse & SQLRDD
I'm using it with xHarbour commercial 6th June 2010 - I tried a later version but had reports from my customers that there was a performance drop.
xBrowse & SQLRDD
Thanks. Does it have a revision number or build, like Fivetech?. Latest version does not work fine with Browses. Did you ever get support from xHarbour.com?.
xBrowse & SQLRDD
SQLRDD reports SQLRDD(EX) 9.0, Build 0015, MGMNT 1.72 I did report the slowness to xHarbour, but they didnt offer much help The problems with the browses I posted here as I use xBrowse. What problems are you getting with the browses?
xBrowse & SQLRDD
With your build, Browses work fine. With latest build, scroll does not work propelly and when you edit a record, the browse goes crazy and duplicates the view. I did not get a reply from Patrick, so that scares me from purchasing their product.
xBrowse & SQLRDD
Lucas, I am afraid xHarbour.com is a failed company. It does still offer a compiler compiled with Pelles, no 64 bits version, no support... It is mainly runned by Patrick Mast. But what I want to share is that our company purchased SQLRDD a couple of years before. We had several issues and we did not get a reply from Patrick. We sent many many emails but not reply. We quit SQLRDD. He is not a serious busssiness man. And, in some kind, the product is a scam. It is very evident in the experience shared by Lucas that he does not provide a working demo and he does not reply the mails too. The best tip to do with SQLRDD from xHarbour.com and Patrick Mast is just ignore it. Very soon the site will close. Opposite, we always get very good support from Fivetech with our FTDN. My two cents.
xBrowse & SQLRDD
Hi, With latest FWH 12.06, xBrowse does not work with SQLRDD. Also, I edited source\xbrowse.prg and remote all calls to SQLRDD. It works better but not fine. Mr. Rao, please can you look at this?. Thank you.
xBrowse & SQLRDD
When I add a new record, the xbrowse displays the first record at the bottom of the browse and looks like there are 2 selected records. If I page up/page down, the browse resets and looks good. If i then move the mouse cursor outside of the browse, the browse corrupts again (first record at the bottom of the browse). Thanks
xBrowse & SQLRDD
That's common, I was presented with the FWH 10.10, with small lists, getting better with larger number of items. I have understood, that the 11.11 that was solved, buy it, but still not able to set to work. And working with the same version of xHarbour (Sep 2010) in both distributions, the 11.11 do not walk. Not say with later versions of xHarbour. Do not know if anyone has done work on the 11.11, with xHarbour of September 2010 or the version of November, 2011. It would be helpful Eso es comun, se me presenta con la FWH 10.10, con listas pequeñas, va mejorando con mayor numero de items. Tengo entendido, que en la 11.11 eso se soluciono, la compre, pero aun no la logro poner a trabajar. Y trabajando con la misma version de xHarbour (Sep 2010) en ambas distribuciones, la 11.11 no anda. Ni digamos con versiones posteriores de xHarbour. No se si alguien ha hecho trabajar la 11.11, con xHarbour de Sep-2010 o bien la version de Noviembre-2011. Seria de mucha ayuda
xBrowse & SQLRDD
Can you please let me know what value OrdKeyNo() returns? Does this function return serial number of the row in the index order?
xBrowse & SQLRDD
OrdKeyNo does not work in SQLRDD. Apparently, there is no way of knowing this (from xHarbour.com)
xBrowse & SQLRDD
[quote="PeterHarmes":75spsrux]OrdKeyNo does not work in SQLRDD. Apparently, there is no way of knowing this (from xHarbour.com)[/quote:75spsrux] I am testing with sqlrdd demo version that I downloaded recently. OrdKeyCount() is returning the number of records and appears to honor filters. The function OrdKeyNo() also does exist. But it always returns 0.0 with the demo version. I wanted to know the results from SQLRDD users who are using the latest regular version. With the demo version I faced another problem. When I tried to read the dbf in a do while loop, the first few rows are repeated over and over and it never reached eof(). I thought it better to ascertain the correct functionality of the Ord**() functions from users of latest regular RDD.
xBrowse & SQLRDD
I had to modify xBrowse to work with SQLRDD - I can send you my version if you like. The only limitation I have is when you multi select records, you must be using an index where the key would be unique ( on a transaction number/record number for example) xBrowse seems to work very well with these modifications <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
xBrowse & SQLRDD
Mr. Nages, OrdKeyNo() does not exist in SQLRDD. It always returns 0, it is fine as their authors say.
xBrowse & SQLRDD
[quote="PeterHarmes":1wasca3f]I had to modify xBrowse to work with SQLRDD - I can send you my version if you like. The only limitation I have is when you multi select records, you must be using an index where the key would be unique ( on a transaction number/record number for example) xBrowse seems to work very well with these modifications <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:1wasca3f] Thanks. Please send to <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
xBrowse & SQLRDD
Hello Peter [quote="PeterHarmes":3smyxd7r]I had to modify xBrowse to work with SQLRDD - I can send you my version if you like. The only limitation I have is when you multi select records, you must be using an index where the key would be unique ( on a transaction number/record number for example) xBrowse seems to work very well with these modifications <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->[/quote:3smyxd7r] With that version of FW and xHarbour Work? Could you send a copy to my email: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Thanks in advance
xBrowse & array
Is it possible to choose columns of array to be displayed on xBrowse? I have array of 20 elements. I want to display only five of them in order 7,3,4,5,6 How to create this kind of xBrowse? I don't want to create another separate array or put to every element oBRWKKPOD :aCols[xxx]:nWidth:=0 to do it. Can I use oBrw:AddCol() or something simmilar? Robert
xBrowse & array
Hello Robert, oBrw:aCols[3]:lHide = .t. ACTIVATE WINDOW oChild ON INIT (oBrw:SwapCols( oBrw:aCols[1], oBrw:aCols[2] ), oBrw:SetFocus()) This is from FWH/SAMPLES/TESTXBRW.prg I implemented the changes. STATIC FUNCTION ArraySort( oWnd ) local oChild, oBrw, oCol local aStruc DEFINE WINDOW oChild TITLE "DBF structure with auto sort and incremental seek" MDICHILD OF oWnd oBrw := TXBrowse():New( oWnd ) aStruc := DBStruct() Aeval( aStruc, {|v| v[1] := Padr( v[1], 10 ) } ) oBrw:SetArray( aStruc, .t. ) oBrw:aCols[1]:cHeader := "NAME" oBrw:aCols[2]:cHeader := "TYPE" oBrw:aCols[2]:nDataStrAlign := AL_CENTER oBrw:aCols[2]:nHeadStrAlign := AL_CENTER oBrw:aCols[3]:cHeader := "SIZE" oBrw:aCols[3]:nDataStrAlign := AL_RIGHT oBrw:aCols[3]:nHeadStrAlign := AL_RIGHT oBrw:aCols[3]:nHeadStrAlign := AL_RIGHT oBrw:aCols[3]:lHide = .t. oBrw:aCols[4]:cHeader := "LENGTH" oBrw:aCols[4]:nDataStrAlign := AL_RIGHT oBrw:aCols[4]:nHeadStrAlign := AL_RIGHT oBrw:lHScroll := .f. oBrw:lVScroll := .f. oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW oBrw:CreateFromCode() oChild:oClient := oBrw ACTIVATE WINDOW oChild ON INIT (oBrw:SwapCols( oBrw:aCols[1], oBrw:aCols[2] ), oBrw:SetFocus()) RETURN NIL
xBrowse & array
Thank you Otto - it works! Robert
xBrowse & array
Here is how: [code:1qntphza] oBrw &#58;= TXBrowse&#40;&#41;&#58;New&#40; oWnd &#41; oBrw&#58;setArray&#40; aData &#41; oBrw&#58;aCols &#58;= &#123;&#125; oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;||cValToChar&#40; aData&#91;oBrw&#58;nArrayAt&#93;&#91;7&#93; &#41;&#125; oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;||cValToChar&#40; aData&#91;oBrw&#58;nArrayAt&#93;&#91;3&#93; &#41;&#125; oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;||cValToChar&#40; aData&#91;oBrw&#58;nArrayAt&#93;&#91;4&#93; &#41;&#125; oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;||cValToChar&#40; aData&#91;oBrw&#58;nArrayAt&#93;&#91;5&#93; &#41;&#125; oCol &#58;= oBrw&#58;AddCol&#40;&#41; oCol&#58;bStrData &#58;= &#123;||cValToChar&#40; aData&#91;oBrw&#58;nArrayAt&#93;&#91;6&#93; &#41;&#125; oBrw&#58;CreateFromCode&#40;&#41; ownd&#58;oClient &#58;= oBrw ACTIVAE WINDOW oWnd [/code:1qntphza]
xBrowse & array
Nageswaragunupudi It looks like my idea to create browser. I'm going to implement it. Thank you. Robert
xBrowse & array
I implemented this code oBRWKKPOD := TXBrowse():New( oDLGKKPOD ) oBRWKKPOD :SetArray( xTABAKT, .T. ) oBRWKKPOD :aCols := {} oCol := oBRWKKPOD:AddCol() oCol:bStrData := {||cValToChar( oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt][2] )} oCol:cHeader := "Kod" oCol:nWidth := 50 oCol:blDClickData := {|| (xKOD_K:=oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt,2],oDLGKKPOD:End()) } oCol := oBRWKKPOD:AddCol() oCol:bStrData := {||cValToChar( oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt][7] )} oCol:cHeader := "Skrót" oCol:nWidth := 150 oCol := oBRWKKPOD:AddCol() oCol:bStrData := {||cValToChar( oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt][10] )} oCol:cHeader := "Miasto" oCol:nWidth := 100 oCol := oBRWKKPOD:AddCol() oCol:bStrData := {||cValToChar( oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt][11] )} oCol:cHeader := "Adres" oCol:nWidth := 100 oCol := oBRWKKPOD:AddCol() oCol:bStrData := {||cValToChar( oBRWKKPOD:aArrayData[oBRWKKPOD:nArrayAt][1] )} oCol:cHeader := "Numer" oCol:nWidth := 50 Looks very good, but I can't autosort this array. I've used SetArray( xTABAKT, .T. ) but when I replaced original array to created in code I losed this function of xBrowse. How to swith it on? Any idea? Robert
xBrowse & array
You can manually define bLClickHeader blocks. Alternatively, let all the columns be defined initially by SetArray method, including autosort. Then hide the columns you dont want. ( eg. oBrw:aCols[n]:Hide() ). You can also swap cols for repositioning them ( eg oBrw:SwapCols( 2,7 ) ) You can then get what you want
xBrowse & array
Otto and Nageswaragunupudi Thank you for help. I've just prepared design of browse what I looked for. Robert
xBrowse ( follow up )
Just a quick question .. when xBrowse opens and goes to the first record .. why is the very top left cell always hi-lited in black .. if you click on it it will turn the correct color .. I do have on init oBrw:SetFocus() .. but that does not seem to effect the initial first cell as xbrow opens .. Any thoughts as how to move the cursor to the first cell so the listbox becomes active ? Thanks Rick Lipkin
xBrowse ( follow up )
Hello Rick, There are two color-settings // xBrowse got Focus Color Row/Cell - Text and Background // --------------------------------------------------------------------- oLbx:bClrSelFocus = { || { SEL_TEXTCOLOR, SEL_BACKCOLOR } } // Black Text on White Background oLbx:bClrSelFocus = { || { 0, 16777215 } } // xBrowse Lost Focus Color Text and Background // --------------------------------------------------------- oLbx:bClrSel = { || { LOST_TCOLOR, LOST_BCOLOR } } // Black Text on White Background oLbx:bClrSel = { || { 0, 16777215 } } Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
xBrowse ( follow up )
This is a problem only when browse is in a dialog and browse is not the first control defined. "ON INIT oBrw:SetFocus()" does not help. Whatever we do ( as far as I know ), the first control defined gets focus when the dialog is activated. In such cases, ( till I learn a better way ) I define the browse as the first control and then define all other controls ( even those which appear above the browse ). Alternatively I remove WS_TABSTOP from the controls defined prior to browse. If I create the dialog from resources, either I change the taborder or remove WS_TABSTOP style from the earlier controls. I am also interested in knowing if there is a better way.
xBrowse ( follow up )
Rick Lipkin please try with ON INIT( oBrw:SetFocus(), [color=#FF0000:ry8pv97n].F.[/color:ry8pv97n] )
xBrowse ( follow up )
Excellant Thanks Mr Daniel. Now I recollect that it was long time back solved in these forums too. Regret I forgot
xBrowse ( follow up )
Daniel YES .. ON INIT( oBrw:SetFocus(), .F. ) worked perfectically !!!! Many thanks Rick Lipkin
xBrowse (MariaDB RS) :bEdit (SOLVED)
Hi All, Using xBrowse RowSet.. oRs:bEdit := { |oRec| MyDialog( oRec ) } not triggering when xBrowse on Tree ... any hint? <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
xBrowse (MariaDB RS) :bEdit (SOLVED)
[quote="fraxzi":m182744q]Hi All, Using xBrowse RowSet.. oRs:bEdit := { |oRec| MyDialog( oRec ) } not triggering when xBrowse on Tree ... any hint? <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->[/quote:m182744q] I got it... need to partner it with: [code=fw:m182744q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />:<span style="color: #000000;">bEdit</span> := <span style="color: #000000;">&#123;</span> |oRec| MyDialog<span style="color: #000000;">&#40;</span> oRec <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <br />:<span style="color: #000000;">bLDblClick</span> := <span style="color: #000000;">&#123;</span>|| oBrw:<span style="color: #000000;">EditSource</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp;</div>[/code:m182744q] <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
xBrowse (con ADS). MAL con Harbour - AYUDA
Buen día, Sigo en el intento de pasar todo a HARBOUR y ya lo tengo "casi" listo. Aclaro que uso ADS Server y la clase Tdatabase para las DBF's Usando ADS Server, tengo un inconveniente con la xBrowse PERO SOLO USANDO HARBOUR. Los mismos prg's compilados con xHarbour (siempre usando RDD ADS), hacen perfectamente el ordenado ascendente Y DESCENDENTE al "clickear" sobre los heads del xBrowse, tal como puede verse en el video: [url:18vsa8fc]http&#58;//youtu&#46;be/b0xCUxP2Bio[/url:18vsa8fc] [b:18vsa8fc]Pero compilando con HARBOUR[/b:18vsa8fc] [color=#0000FF:18vsa8fc] (siempre usando RDD ADS)[/color:18vsa8fc], [color=#004000:18vsa8fc][b:18vsa8fc]NO HACEN EL ORDENADO DESCENDENTE AUNQUE PUEDE VERSE QUE LAS FLECHITAS CAMBIAN[/b:18vsa8fc][/color:18vsa8fc], esto se ve en el video: [url:18vsa8fc]http&#58;//youtu&#46;be/ZTbYv-TuA6Y[/url:18vsa8fc] Gracias a Carlos Vargas pude generar la lib RDDADS.LIB para la versión actual de Harbour pero el problema persiste. Agradezco cualquier ayuda. Creo que es lo único que me resta solucionar para poder tener la aplicación funcionando en Harbour. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse (con ADS). MAL con Harbour - AYUDA
Cuando yo usaba ADS tenia que poner estas lines al inicio de mi prg. [code=fw:30c7r53i]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> _ADS_SERVER_<br />#ifdef _ADS_SERVER_<br />&nbsp; &nbsp; &nbsp; &nbsp; REQUEST ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo,AdsGetRelKeyPos,AdsSetRelKeyPos,DBFCDX,DBFFPT<br />&nbsp;#else<br />&nbsp; &nbsp; &nbsp; &nbsp; Extern ADS,ADSKeyCount,ADSKeyNo,DBFCDX,DBFFPT<br />&nbsp;#endif &nbsp; <br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:30c7r53i] Sobre todo cuando usaba xbrw. saludos.
xBrowse (con ADS). MAL con Harbour - AYUDA
Cesar, Gracias por responder. Lo que indicas es necesario tanto para Harbour como para xHarbour y lo tengo declarado en el primer prg. No viene por ese lado el problema ya que en xHarbour funciona normal pero en Harbour no. Rolando
xBrowse (con ADS). MAL con Harbour - AYUDA
UP
xBrowse (con ADS). MAL con Harbour - AYUDA
Rolando; Hola. Por favor muestra el código de tu xbrowse y lo que asignas a oCol:bClickHeader. ¿Tal vez puedas crear un ejemplo reducido que reproduzca el problema? Saludos, Reinaldo.
xBrowse (con ADS). MAL con Harbour - AYUDA
Reinaldo, Copio el prg de ejemplo (así lo uso básicamente) [code=fw:34np2exe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ADS.CH"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #B900B9;">///// esto es para el ADS, además un init procedure al final ///////////////////</span><br />REQUEST HB_LANG_ES<br />REQUEST ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos ,DBFCDX, DBFFPT<br />REQUEST HB_Lang_ES<br /><br />  <span style="color: #00C800;">Function</span> Test<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <br />   <br />    <span style="color: #00C800;">local</span> cAlias:=cGetNewAlias<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'Test'</span><span style="color: #000000;">&#41;</span>, oDlg, oBrw<br />    <span style="color: #00C800;">local</span> aCols:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"FIRST"</span>, <span style="color: #ff0000;">"LAST"</span>, <span style="color: #ff0000;">"STREET"</span>, <span style="color: #ff0000;">"CITY"</span>, <span style="color: #ff0000;">"AGE"</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> aHeads:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"NOMBRE"</span>, <span style="color: #ff0000;">"APELLIDO"</span>, <span style="color: #ff0000;">"DIRECCION"</span>, <span style="color: #ff0000;">"CIUDAD"</span>, <span style="color: #ff0000;">"EDAD"</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> aPictures:=<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"@!"</span>, <span style="color: #ff0000;">"@!"</span>, <span style="color: #ff0000;">"@!"</span>, <span style="color: #ff0000;">"@!"</span>, <span style="color: #ff0000;">"99"</span><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">local</span> aColSizes:=<span style="color: #000000;">&#123;</span><span style="color: #000000;">160</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">160</span>,<span style="color: #000000;">80</span><span style="color: #000000;">&#125;</span><br />        <br />        set date british<br />    set epoch <span style="color: #0000ff;">to</span> <span style="color: #000000;">1960</span><br />    SET CENTURY <span style="color: #0000ff;">ON</span><br />    <br />            use <span style="color: #ff0000;">".<span style="color: #000000;">\C</span>USTOMER"</span> shared <span style="color: #00C800;">new</span> <span style="color: #0000ff;">alias</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span> via rddsetdefault<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <br />            DATABASE oDbf<br />    <br />    <br /><br />    <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">resource</span> <span style="color: #ff0000;">"TESTXBR"</span> transparent<br /><br />            <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4001</span> DATASOURCE oDbf ;<br />      COLUMNS aCols ; <br />      HEADERS aHeads; <br />      PICTURES aPictures  ;<br />      COLSIZES aColSizes ;<br />      AUTOSORT CELL LINES <br /><br /><br /><br />        WITH OBJECT oBrw<br />  <br />        :<span style="color: #000000;">bClrRowFocus</span>     := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">185</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span>     <span style="color: #B900B9;">//   PARA LOGRAR LINEAS</span><br />      :<span style="color: #000000;">nMarqueeStyle</span>        := MARQSTYLE_HIGHLROWRC                                             <span style="color: #B900B9;">//   CON MAS OSCURO EL CAMPO</span><br />        :<span style="color: #000000;">nEditTypes</span>       := EDIT_GET<br />            :<span style="color: #000000;">nHeadStrAligns</span>   := AL_CENTER<br />      :<span style="color: #000000;">nStretchCol</span>      := STRETCHCOL_WIDEST<br />      :<span style="color: #000000;">nColDividerStyle</span> := ;<br />      :<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_LIGHTGRAY<br />      :<span style="color: #000000;">lAllowRowSizing</span>  := .f.<br />      :<span style="color: #000000;">lContrastClr</span>     := .f.<br />            :<span style="color: #000000;">nFreeze</span>:=<span style="color: #000000;">1</span>                                      <br />                         <br />    END<br /><br /><br />        <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <br />        <br />    oDbf:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <br />  <span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------------------------------------------------</span><br /><br />    <br /><br /><br /> <span style="color: #0000ff;">Init</span> Procedure Inicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />  RddRegister<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADS"</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br />  RddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADS"</span> <span style="color: #000000;">&#41;</span><br />  AdsSetServerType<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">//(3)    // (7) para cualquier servido . para seleccionar el tipo de servidor ADS, 1= local, 2= remoto y 3= los dos.</span><br />  AdsSetFileType<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />  AdsLocking<span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br />  AdsRightsCheck<span style="color: #000000;">&#40;</span> .f. <span style="color: #000000;">&#41;</span><br />  SET <span style="color: #00C800;">SERVER</span> REMOTE                 <br />  SET FILETYPE <span style="color: #0000ff;">TO</span> CDX<br /><br /> <span style="color: #00C800;">Return</span></div>[/code:34np2exe] También subí al box el prg, el res y los exe's. [b:34np2exe][u:34np2exe]El compilado con xHarbour funciona correctamente[/u:34np2exe][/b:34np2exe][u:34np2exe] [b:34np2exe][color=#FF0000:34np2exe]pero el compilado con Harbour no[/color:34np2exe][/b:34np2exe][/u:34np2exe]. Lo que deduzco es que en los archivos ".C" de Harbour para el ADS hay algún error ya que genero la LIB para ADS en Harbour y me da ese error. Está todo en: [url:34np2exe]https&#58;//app&#46;box&#46;com/s/r1rt9rldprp8bgy8xgzf[/url:34np2exe] [b:34np2exe][color=#0000BF:34np2exe]Por supuesto que para que estos ejemplos funciones se debe tener el server ADS activo.[/color:34np2exe][/b:34np2exe] Espero, con la ayuda de Ustedes, poder solucionar este tema y así pasarme a Harbour ya que logré pasar todo pero sigo usando xHarbour por este problema. Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse (con ADS). MAL con Harbour - AYUDA
Disculpen el O.T. [quote="sysctrl2":3cptwipt]Cuando yo usaba ADS tenia que poner estas lines al inicio de mi prg. [code=fw:3cptwipt]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#define</span> _ADS_SERVER_<br />#ifdef _ADS_SERVER_<br />        REQUEST ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo,AdsGetRelKeyPos,AdsSetRelKeyPos,DBFCDX,DBFFPT<br /> #else<br />        Extern ADS,ADSKeyCount,ADSKeyNo,DBFCDX,DBFFPT<br /> #endif   <br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3cptwipt] Sobre todo cuando usaba xbrw. saludos.[/quote:3cptwipt] Yo solo agrego esto [code=fw:3cptwipt]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST ADS, HB_Lang_ESWIN, HB_CODEPAGE_ESWIN<br />EXTERNAL ADSKeyCount,ADSKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos<br /> </div>[/code:3cptwipt] Las preguntas son: Es conveniente agregar a lo que indica Cesar: HB_Lang_ESWIN, HB_CODEPAGE_ESWIN? Cuando es ADS_LOCAL porque no es necesario agregar lo indicado en REQEST?
xBrowse (con ADS). MAL con Harbour - AYUDA
UP (último intento, si no logro solucionarlo deberé seguir con xHarbour). Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
xBrowse + ADS = Slow Motion!
I'm using ADS, I acquired the FW 10.5 and as part of the version migration in my search screen I upgraded from wBrowse to the xBrowse but with ADS it was too slow... I have an version of my program without the ADS and in this there is no speed difference from wBrowse to xBrowse, but I use this version only for tests. With 75.000 registers I took about 15 seconds just to open the dialog with the xBrowse, and below 1 second with wBrowse. I use xBrowse in many places in my system, but the in my search screen i can't use it because of the speed issue.
xBrowse + ADS = Slow Motion!
I used XBrowse for browsing 800,000 rows table, with user selectable filters and all features, with around 200 simultaneous users on client server environment over slow speed wide area network ( those days our WAN speeds were as low as 64kbps/128 kbps). There are a few tricks to use XBrowse with ADS. If followed we gain speeds similar to WBrowse.
xBrowse + ADS = Slow Motion!
Thanks u for sharing u tricks Jaque
xBrowse + ADS = Slow Motion!
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=9343&p=79429&hilit=adsrecordcount#p79429">viewtopic.php?f=3&t=9343&p=79429&hilit=adsrecordcount#p79429</a><!-- l -->
xBrowse + ADS = Slow Motion!
Hi, yes, xBrowse + ADS + tricks is fast <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> But there is another annoying speed issue regarding ADS and the WildMatch function. Animated by this topic <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=15469">viewtopic.php?f=3&t=15469</a><!-- l --> and specially Rao's statement: [quote:3ndajae5]All my earlier programs contained similar code since clipper days. Open the dbf file with FOpen in shared mode scan the entire text and work back the record numbers and then proceed. ( I also read the dbf files in this raw mode to check integrity and for repairs. ) But those were the days when we did not have these advanced functions. Now these functions are available. I did not compare the speeds but please consider what happens in these two different cases. Assume the dbf resides on a remote server. Our program is executed on the client PC. Our old logic reads the entire DBF file. May be fast, but it still reads the entire DBF data. OrdWildSeek reads only the index contents. In effect the quantity of data ordwildseek has to read is less than the data we read in our raw dbf read method. Assume a DBF file with record length of 2048, containing 100,000 records. We read 205 MB of data in our old method. Assume an index on field city with a field length of 20 bytes. Size of the index is only 2 MB. Isn't it faster to search in 2 MB of data than in 205 MB of data ? Long time back, I read somewhere that indexes are fully read over the client in the beginning. I am not sure it it is so even in the present RDDs. In such a case, reading data in indexes from local memory ( or memory cache ) is faster than reading from a remote computer. I say I remember to have read, but I am not sure. Further more, our coding effort is reduced a lot. I can’t imagine that skipping through the file record by record is the solution. I agree. For this, setting filter with WildMatch( ... ), as proposed by Mr Armando, is the best solution. It is working for me well. But this function is available in xharbour only. I am sure some function with similar functionality may be available in Harbour too. But I am not aware of it. Wish some Harbour pundits throw some light on this.[/quote:3ndajae5] I've built a filter function with Wildmatch and it is working quit well and fast for small tables, e. g. a customer address table with 25000 recnos. For larger tables, have tested one with 250000 recnos, the WildMatch function is extremely slow, means that the time for setting the filter needs typically 30 minutes, yes minutes not seconds <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Rao, is there a chance to improve this situation using furthermore WildMatch, or do you recommend another approach for ADS users?
xBrowse + ADS = Slow Motion!
If we are using ADS, let us not think in terms of wildmatch. Let us approach from Fast Text Search feature. This feature on ADS is similar to Oracle, MSSql and other major RDMSs functionally. If we create appropriate FTS indexes, the results are spectacular even on tables with million rows. Filters containing UDFs are not optimized by ADS and the entire filtering is done at the client side, reading record by record. We should never think of using any expression that can not be optimized by ADS server. But FTS is different from wildmatch but we get similar (but not same) functionality. We need to give the user the best within the constraints of the tools we have. But let me say this. ADS client server software's server side filters are very fast. I could get acceptable results even with very inefficient filters like "'ADAM' $ FIRSTNAME" on tables with half a million rows. Whatever I said in my earlier post was with reference to DBFCDX not ADS. That does not apply to ADS client server.
xBrowse + ADS = Slow Motion!
Rao, thank you very much for clarification.
xBrowse + ADS = Slow Motion!
Rao, tested FTS in our customer address table: [code=fw:2gomqywc]<div class="fw" id="{CB}" style="font-family: monospace;">            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"name1"</span>, <span style="color: #ff0000;">"name1"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"name2"</span>, <span style="color: #ff0000;">"name2"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"name3"</span>, <span style="color: #ff0000;">"name3"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"pst_str"</span>, <span style="color: #ff0000;">"pst_str"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"ort"</span>, <span style="color: #ff0000;">"ort"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsCreateFTSIndex<span style="color: #000000;">&#40;</span> , <span style="color: #ff0000;">"bmrkng"</span>, <span style="color: #ff0000;">"bmrkng"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />            cFilter := <span style="color: #ff0000;">'contains( dbtrn->Name1,   "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />                       <span style="color: #ff0000;">'contains( dbtrn->Name2,   "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />                       <span style="color: #ff0000;">'contains( dbtrn->Name3,   "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />                       <span style="color: #ff0000;">'contains( dbtrn->Pst_str, "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />                       <span style="color: #ff0000;">'contains( dbtrn->Ort,     "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />                       <span style="color: #ff0000;">'contains( dbtrn->Bmrkng,  "'</span> + AllTrim<span style="color: #000000;">&#40;</span> Lower<span style="color: #000000;">&#40;</span> cPattern <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'" )'</span><br />         MsgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Der Filter wird gesetzt, bitte warten!"</span>, <span style="color: #ff0000;">"Filter setzen"</span>, <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> AdsSetAOF<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:2gomqywc] and it's fast or even faster than the WildMatch dependant on a local machine, thank you very much for giving me this broad hint <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: -->
xBrowse + ADS = Slow Motion!
[quote:1i0ptg4j]it's fast or even faster than the WildMatch[/quote:1i0ptg4j] Please study the syntax in detail. You do not have to 'OR' different 'CONTAINS'. One CONTAINS is enough for many AND and OR conditions. Syntax is similar on almost all RDMSs. It is faster even on remote server (using client server ADS) because it is server side filter. You will feel really happy with the instantaneous response when applying this filter on very large tables on very slow connections. But we can not do what all we can do with WildMatch. Still this feature is enough for most applications. Also this approach is consistent with all other major RDMSs. Finally, when you know how to use ADS with XBrowse, I am sure you will stick to XBrowse + ADS and will not consider other options.
xBrowse + ADS = Slow Motion!
Hi, I think you can add logical condition inside query CONTAINS( <field>... ' text search [OR|AND|NEAR] textsearch [OR|AND|NEAR] .....' ) regards and save paul <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
xBrowse + ADS = Slow Motion!
Rao, you wrote: [quote:by1v6ha2]Please study the syntax in detail. You do not have to 'OR' different 'CONTAINS'. One CONTAINS is enough for many AND and OR conditions. Syntax is similar on almost all RDMSs.[/quote:by1v6ha2] Studying syntax from here <!-- m --><a class="postlink" href="http://devzone.advantagedatabase.com/dz/webhelp/Advantage10/index.html?master_contains.htm">http://devzone.advantagedatabase.com/dz ... ntains.htm</a><!-- m -->:[quote:by1v6ha2]Syntax CONTAINS(<field> | *, <cSearchCondition> ) -> lSearchResult Parameters <field> | *     The field to apply the search condition to. The asterisk (*) can be used to specify that all fields with full text search (FTS) indexes are to be searched. This parameter can be a character value or the result of some expression that returns a character value, but the search will not be optimized. For best performance, this parameter should be the asterisk or a field that has a full text search index built on it.[/quote:by1v6ha2] and for example here: <!-- m --><a class="postlink" href="http://www.techtalkz.com/microsoft-sql-server/189937-full-text-search-multiple-columns.html">http://www.techtalkz.com/microsoft-sql- ... lumns.html</a><!-- m -->. So my code has to be something like: [code=fw:by1v6ha2]<div class="fw" id="{CB}" style="font-family: monospace;">cFilter := <span style="color: #ff0000;">'contains( ( <field1>, <field2>, ..., <fieldn> ), <cPattern> )'</span></div>[/code:by1v6ha2] But all tries in this direction failed, respectively no recnos were filtered and LastRec() is equal OrdKeyCount(). Also don't understand where to place the logical statement, here 'OR' and there are NO indications of a fieldlist in the ADS documents. Please can you help once more?
xBrowse + ADS = Slow Motion!
Examples: Search conditions that use only search words combined with the logical operators AND and OR are fully optimized (assuming an FTS index exists on the field being searched). For example, the following query is fully optimized: SELECT * FROM apdd where contains( definition, ‘science and (history or proof)’ ) Please see <!-- m --><a class="postlink" href="http://devzone.advantagedatabase.com/dz/webhelp/Advantage10/index.html?master_contains.htm">http://devzone.advantagedatabase.com/dz ... ntains.htm</a><!-- m --> You may use * for searching in all FTS indexed fields
xBrowse + ADS = Slow Motion!
Marcelo, Rao, yes, if you have more then one search word, but what about a fieldlist and how are these fields combined per default, 'OR' or 'AND' and how to change? Remember, my logic is: [code=fw:e47zurn6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #ff0000;">'contains( field1,   "'</span>  + cPattern + <span style="color: #ff0000;">'" ) OR '</span> + ;<br /><span style="color: #ff0000;">'contains( field2,   "'</span> + cPattern + <span style="color: #ff0000;">'" ) OR '</span> + ;<br /><span style="color: #ff0000;">'contains(field3,   "'</span> + cPattern + <span style="color: #ff0000;">'" ) OR '</span> + ;<br />...<br /><span style="color: #ff0000;">'contains( fieldn,  "'</span> + cPattern + <span style="color: #ff0000;">'" )'</span></div>[/code:e47zurn6] Where cPattern can be a list of search words:[code=fw:e47zurn6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #ff0000;">' text search [OR|AND|NEAR] textsearch [OR|AND|NEAR] .....'</span></div>[/code:e47zurn6] Tried also '*' but it's not functional (for me), same result as a fieldlist. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Paul is NOT my friend, so I can't promise anything <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
xBrowse + ADS = Slow Motion!
Frank, you are right, there is not other way because the logical operators are for the fields and not for the text search regards Marcelo
xBrowse + ADS = Slow Motion!
Tambem tive este problema, resolvi mais não é o correto a fazer. Isto não acontece se usar sistema remoto do ads. Altere no Method SetRDD() [code=fw:owg6azi2]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; cAdsKeyNo &nbsp; &nbsp;:= <span style="color: #ff0000;">"{| n, Self | iif( n == nil, "</span> +;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"Round( "</span> + cAlias + <span style="color: #ff0000;">"->( ADSGetRelKeyPos() ) * Self:nLen, 0 ), "</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cAlias + <span style="color: #ff0000;">"->( ADSSetRelKeyPos( n / Self:nLen ) ) ) }"</span><br />&nbsp;<br />&nbsp; &nbsp; &nbsp; cAdsKeyCount := <span style="color: #ff0000;">"{|| "</span> + cAlias + <span style="color: #ff0000;">"->( ADSKeyCount(,,1) )}"</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//// GIOVANY VECCHI</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>LASTREC<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">5000</span> .and. <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span>AdsGetTableConType<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>==<span style="color: #000000;">1</span> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cAdsKeyCount := <span style="color: #ff0000;">"{|| "</span> + cAlias + <span style="color: #ff0000;">"->( ADSKeyCount(,,2) )}"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cAdsKeyCount := <span style="color: #ff0000;">"{|| "</span> + cAlias + <span style="color: #ff0000;">"->( ADSKeyCount(,,1) )}"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp;</div>[/code:owg6azi2]
xBrowse + EDIT_GET
Friends, I'm having a problem with the code bellow where I'm showing a rowset content and trying allow to edit two fields(Columns 3 and 9). But the EDIT_GET is only working for the column 3. For the other column(9) double click is not activating the edit. I have already tried with EDIT_GET_BUTTON, but don't work too. Do you know what am I doing wrong ? [code=fw:wynu9nwi]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Splitter.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oCn, oRs,nSec:=Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oQryMvg,aCols,oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>,oWndAgd,oCol,oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>,oVSplit,oPanelExplorer,oExBar,oMenu<br /><br />   oCn   := Connect<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #B900B9;">//QUERY DE GUIAS</span><br />   oQryMvg := oCN:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT mvg.*,cli.fantasia,cli.end_fatu,cli.no_fatu,loc.descricao,loc.zs,pes.nome,ttp.descricao AS tipo,ttp.natureza,mps.hora_ini "</span>+;<br />                                 <span style="color: #ff0000;">"FROM tmovguias AS mvg LEFT JOIN clientes AS cli ON mvg.ccliente=cli.ccliente LEFT JOIN tlocais AS loc ON mvg.clocal=loc.clocal "</span>+;<br />                                 <span style="color: #ff0000;">"LEFT JOIN ttipoviag AS ttp ON mvg.ctipo=ttp.ctipo LEFT JOIN tmovgpes AS mps ON mps.data = ? AND mps.funcao IN('F','O') AND "</span>+;<br />                                 <span style="color: #ff0000;">"mvg.cequipto=mps.cequipto LEFT JOIN tpessoal AS pes ON mps.cmat=pes.cmat WHERE mvg.data = ?"</span>,<span style="color: #000000;">&#123;</span>Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-2</span>,Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">-2</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWndAgd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ordens de Serviço para "</span>+Dtoc<span style="color: #000000;">&#40;</span>date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">MENU</span> oMenu<br /><br />      oExBar := TExplorerBar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">255</span>, <span style="color: #000000;">300</span>, oPanelExplorer <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #B900B9;">//CRIA BROWSE DE VEÍCULOS</span><br />      oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := oExBar:<span style="color: #000000;">AddPanel</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Veículos"</span>,,<span style="color: #000000;">255</span> <span style="color: #000000;">&#41;</span><br /><br /><br />      <span style="color: #B900B9;">//CRIA BROWSE DE EQUIPES</span><br />      oPanel<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := oExBar:<span style="color: #000000;">AddPanel</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Equipe"</span> ,,<span style="color: #000000;">165</span> <span style="color: #000000;">&#41;</span><br /><br /><br />      <span style="color: #B900B9;">//BROWSE DE OS</span><br />      aCols := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"IF(natureza='R' AND cterno=NIL,[Recolhimento],cterno)"</span>,<span style="color: #ff0000;">"Nº Terminal"</span>,,<span style="color: #000000;">85</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span>|| oQryMvg:<span style="color: #000000;">fantasia</span>+CRLF+<span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>oQryMvg:<span style="color: #000000;">descricao</span>=<span style="color: #00C800;">NIL</span>.OR.Empty<span style="color: #000000;">&#40;</span>oQryMvg:<span style="color: #000000;">descricao</span><span style="color: #000000;">&#41;</span>,Rtrim<span style="color: #000000;">&#40;</span>oQryMvg:<span style="color: #000000;">end_fatu</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">","</span>+oQryMvg:<span style="color: #000000;">no_fatu</span>,oQryMvg:<span style="color: #000000;">descricao</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,<span style="color: #ff0000;">"Cliente/Local"</span>,,<span style="color: #000000;">300</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"cequipto"</span>,<span style="color: #ff0000;">"Viatura"</span>,<span style="color: #ff0000;">"!!!!!"</span>,<span style="color: #000000;">70</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"nome"</span>,<span style="color: #ff0000;">"Operador/Fiel"</span>,,<span style="color: #000000;">200</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"hora_ini"</span>,<span style="color: #ff0000;">"Hr.Inicio"</span>,<span style="color: #ff0000;">"@R 99:99"</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">"hora_ini"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"hora_fim"</span>,<span style="color: #ff0000;">"Hr.Término"</span>,<span style="color: #ff0000;">"@R 99:99"</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">"hora_fim"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"hora_lim"</span>,<span style="color: #ff0000;">"Hr.Limite"</span>,<span style="color: #ff0000;">"@R 99:99"</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">"hora_lim"</span><span style="color: #000000;">&#125;</span>,;<br />                <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"tipo"</span>,<span style="color: #ff0000;">"Tipo de OS"</span>,,<span style="color: #000000;">120</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">"tipo"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"zs"</span>,<span style="color: #ff0000;">"Rota"</span>,<span style="color: #ff0000;">"@!"</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#123;</span>|| aSituacao<span style="color: #000000;">&#91;</span><span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span>oQryMvg:<span style="color: #000000;">situacao</span>,<span style="color: #ff0000;">"NEIFTC"</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span>,<span style="color: #ff0000;">"Situação"</span>,,<span style="color: #000000;">100</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"clote"</span>,<span style="color: #ff0000;">"Lote"</span>,,<span style="color: #000000;">45</span>,<span style="color: #000000;">0</span>,<span style="color: #ff0000;">"clote"</span><span style="color: #000000;">&#125;</span>,<span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"valordin"</span>,<span style="color: #ff0000;">"Valor"</span>,<span style="color: #ff0000;">"999,999,999.99"</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#125;</span><br /><br />      @ <span style="color: #000000;">00</span>,<span style="color: #000000;">255</span> <span style="color: #0000ff;">XBROWSE</span> oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">OF</span> oWndAgd COLUMNS aCols DATASOURCE oQryMvg CELL LINES FASTEDIT AUTOSORT <span style="color: #0000ff;">PIXEL</span><br />               oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nRowHeight</span>    := <span style="color: #000000;">35</span><br />               oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">3</span><br />               oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nStretchCol</span>   := STRETCHCOL_LAST<br /><br />               oCol:= oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span><br />               oCol:<span style="color: #000000;">nEditType</span>   := EDIT_GET<br /><br />               <span style="color: #B900B9;">//the problem is happening in this column</span><br />               oCol:= oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">9</span> <span style="color: #000000;">&#93;</span><br />               oCol:<span style="color: #000000;">nEditType</span>   := EDIT_GET<br /><br />               oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />      @ <span style="color: #000000;">0</span>,<span style="color: #000000;">255</span>    SPLITTER oVSplit ;<br />                 <span style="color: #0000ff;">VERTICAL</span> ;<br />                 PREVIOUS CONTROLS oExBar ;<br />                 HINDS CONTROLS oLbx<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>;<br />                 <span style="color: #0000ff;">LEFT</span> MARGIN <span style="color: #000000;">250</span> ;<br />                 <span style="color: #0000ff;">RIGHT</span> MARGIN <span style="color: #000000;">80</span> ;<br />                 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">4</span>, <span style="color: #000000;">355</span>  <span style="color: #0000ff;">PIXEL</span> ;<br />                 <span style="color: #0000ff;">OF</span> oWndAgd ;<br />                 _3DLOOK<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWndAgd <span style="color: #0000ff;">MAXIMIZED</span> ;<br />      <span style="color: #0000ff;">ON</span> RESIZE <span style="color: #000000;">&#40;</span>oVSplit:<span style="color: #000000;">AdjRight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   oItalic:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oBold:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:wynu9nwi]
xBrowse + EDIT_GET
Can you kindly reproduce this problem using any tables that are already exist in our demoserver? You can log into the demo server with FW_DemoDB(). Check the existing tables with oCn:ListTables() You can also add any test table of your own with dummy data.
xBrowse + EDIT_GET
Mr Rao, It's difficult because I don't know those tables, how are the relations, etc. The worst is IF works your tables I will continue with my problem <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->