topic
stringlengths
1
63
text
stringlengths
1
577k
Advantage Iniciando
Saludos al Forum Que debo tener instaldo para trabajar con Advantage. y como hago la conexion, algun ejemplo. con conexion ODBC, OLE , o se puede hacr la conexion sin necesidad de usar ODBC, OLE Tengo Instalado esto. arc32.exe (Advantage Data Architect 10.1) adsodbc.exe (Advantage OLE DB Provider) oledb.exe (Advantage ODBC Driver) Que mas se requiere instalar. Baje un link tAds_2.zip arc32_10.1.exe (Advantage Data Architect ) ADS_101_SETUP.exe (Para que sirve) ACE32_10.LIB (Esta seria la libreria a enlazar cn la compilacion) RddAds_10.lib (Esta seria la libreria a enlazar cn la compilacion) Saludos al Forum
Advantage Iniciando
Hola Ruben Dario, también estoy interesado en este tema. Hay varios gurú en ADS, sería muy bueno un manual en español, pero es difícil de conseguir por ahora. También puedes enviarle un correo al creador de tDads, también la tiene clara. Saludos Ruben Dario Fernández.
Advantage Iniciando
Hola como esta. En los mensajes del Forum, me parece que tu has trabajado con la base de datos APOLLO se ve interesante esta base de Datos Gracias por tu informacion.
Advantage Iniciando
No, no lo he hecho. Es más mande un mail y no me han respondido. Esta bastante en precio. Quizás alguien sepa más de Apollo en el foro. Voy a poner un post. Gracias y saludos cordiales. Rubén Dario Fernández Fwh 16.08 - Bcc 7.2 - Synwrite
Advantage Iniciando
Con ADS , ya logre hacer conexion , pero USANDO ODBC y OLE para trabajar con ADO. tengo entendido que el problema de trabajar cond ADO es que no actualiza los Indices, Ejemplpo los CDX Con la Base de Datos APOLLO no es posible, no tienen un OLE o ODBC
Advantage Local Server over network
Hello! We have an aplication build with FWH that is using DBF on Windows 2003 server using Advantage Local Server (ALS) DLLs. We have noticed that browse is very fast immediately after reindex, but after some appends browse slows down drastically. Have you ever noticed such behaviour in you apps and what could be a reason ? Thanks, Roman
Advantage Local Server over network
Dear Mr. Roman, I'm using ALS too over network.. I haven't experienced such problem.. But take a look at AOF's if you have one.. 'ADS_RESPECTFILTERS' usually the culprit of slowing browses..
Advantage Servidor
Algo Raro, Tengo Instalado un dataserer advantage en una maquina con windows seven, y programas clientes en terminales que acceden a dicho servidor, en las estaciones que tengo windows xp, todo bien, en aquellas que tengo windos 10, los archivos son abiertos como exclusivos, y no permite que otras terminales accedan a los datos, he probado con data Arquitec de Ads, y pasa lo mismo entiendo entonces que no es mi aplicación, alguien le ha pasado lo mismo?, ADS ver 10.10
Advantage Servidor
Hasta donde se, advantage database server cuando es usado en modalidad servidor la comunicación es a través de socket/puertos. no a través de sistemas de fichero. solo cuando se usa en modo local server es que trabaja con sistema de fichero.
Advantage Servidor
Gracias Carlos, pero lo raro que con windows xp funciona barbaro
Advantage Servidor
Hola Utilizas Diccionario de Datos? si es si como abres el DD
Advantaje y la Ver 1505 de Fw
Necesito generar rddads.lib para la ultima version de fw, si alguien me puede orientar! Gracias!
Advantaje y la Ver 1505 de Fw
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=30561&start=0&hilit=rddads">viewtopic.php?f=6&t=30561&start=0&hilit=rddads</a><!-- l -->
Advertencia seguridad en Windows XP
Hola, he buscado en el foro y no hay soluciones definitivas aparentemente en relación a este problema.Es cuando al ejecutar nuestro EXE el Windows indica que no se puede verificar el fabricante del software y si deseamos de todos modos ejecutarlo y bla,bla,bla.Lo raro es que sólo ocurre en algunas máquinas con XP, no en todas. Desoncozco en Vista si también hay este inconveniente.Más alla de que se trata sólo de un click y se ingresa, no es muy buena imágen la que nos deja.Alguno encontró una solución al tema? Bueno, gracias y saludos a todosIván
Advertencia seguridad en Windows XP
debes hacerle una firma digital
Advertencia seguridad en Windows XP
Hola, incorpore esto a tu archivo de recursos[code:2ixb8dcf] VERSAO VERSIONINFO FILEVERSION 1, 0, 0, 0 PRODUCTVERSION 1, 0, 0, 0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEOS VOS__WINDOWS32 FILETYPE VFT_APP &#123; BLOCK "StringFileInfo" &#123; BLOCK "041604B0" &#123; VALUE "CompanyName", "Fivetech Software\000" VALUE "FileDescription", "Videos - Locadora\000" VALUE "FileVersion", "1&#46;0\000" VALUE "LegalCopyright", "2005,2006 - Empresa de CVS\000" VALUE "OriginalFilename", "VENTAS&#46;EXE\000" VALUE "ProductName", "Ventas\000" VALUE "ProductVersion", "2&#46;0\000" &#125; &#125; BLOCK "VarFileInfo" &#123; VALUE "Translation", 1046, 1200 &#125; &#125; [/code:2ixb8dcf]Saludos
Advertencia seguridad en Windows XP
Debes agregar en el panel de control el nivel de seguridad del programa colocandolo en los permitidos siempre....ahora no recuerdo bien....pero por alli esta la opcion...por panel de control de XP.
Advertencia seguridad en Windows XP
Bueno, gracias. Pruebo y aviso.Saludos
Advertencia seguridad en Windows XP
He agregado lo que indica Karinha y sigue apareciendo el mensaje de advertencia.QAZWSX2K como se hace la firma digital?
Advertencia seguridad en Windows XP
[quote="Alfredo Arteaga":hd03hzyq]He agregado lo que indica Karinha y sigue apareciendo el mensaje de advertencia. QAZWSX2K como se hace la firma digital?[/quote:hd03hzyq]Alfredo, porfa puedes poner una imagen de la advertencia?Saludos. <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
Advertencia seguridad en Windows XP
Gracias Karinha. Son estos mensajes...[url=http&#58;//img407&#46;imageshack&#46;us/my&#46;php?image=advertenciamn8&#46;jpg:hef5qavh][img:hef5qavh]http&#58;//img407&#46;imageshack&#46;us/img407/5425/advertenciamn8&#46;th&#46;jpg[/img:hef5qavh][/url:hef5qavh]
Advertencia seguridad en Windows XP
[quote="Alfredo Arteaga":1f7fv5oa]Gracias Karinha. Son estos mensajes... [url=http&#58;//img407&#46;imageshack&#46;us/my&#46;php?image=advertenciamn8&#46;jpg:1f7fv5oa][img:1f7fv5oa]http&#58;//img407&#46;imageshack&#46;us/img407/5425/advertenciamn8&#46;th&#46;jpg[/img:1f7fv5oa][/url:1f7fv5oa][/quote:1f7fv5oa]Alfredo, hicestes algo errado. Debria funcionar perfecto como acá.Ablas com Antonio ó mira algun ejemplo en \samplesAsi, me funciona sin problemas.Saludos.
Advertencia seguridad en Windows XP
Hola, a todos.Casi con toda deguridad que solucion es el IE7.Prueba lo siguiente: - Abre las opciones de Internet - Pincha en la pesta de Seguridad - Ahora pincha sobre el apartado de Intranet Local - A continuación pincha el botón de Sitios - Verás que te aparece una pantalla cuya primera casilla de verificación dice : "Detectar redes Intranet Automáticamente". Esta casilla viene marcada por defecto, como en la versión anterior, y debería hacer que todos los ordenadores que están en tu red local fuesen detectados como sitios de " Intranet Local", pero en esta versión hace justamente lo contrario (se supone que por error).Saludos
Advice about LETODB SQLWin and AdoRDD
Good morning, I have been doing some testing with Letodb and works quite well, however before I put my program in production, which is not urgent, I would like to ask for your advice. I would like to know if someone is using Letodb, how long has been using it for, the number or concurrent users, the number of records of the databases, the speed obtained, possible errors or malfunctions detected, etc. My program is a small manufacturing, logistics and invoicing software, which I made 20 years ago in Clipper Summer ’87 and it’s been working every day since then. Nowadays it is in FWH 8.06 and Harbour 1.0.1. The dimensions would be: 8 users (Windows XP) in a local network with Windows 2003 server. About 30 tables DBFCDX, the biggest with 80.000 records and 28 MB. The reason for using Letodb is to allow other users to connect from outside the office using internet ADSL. These connections would be occasional and mostly viewing rather than adding or editing records. I would rather not to use VNC or Terminal Server. I have been reading in this forum about other options like SQLWin, AdoRDD and Tmysql. Any advice about them? I see that the last posts about SQLWin and AdoRDD are some months old. Are the last versions stable and full functional? Is it too complicated for my needs? Thank you very much for you help. Regards, Alvaro
Advice about LETODB SQLWin and AdoRDD
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=88719#p88719">viewtopic.php?p=88719#p88719</a><!-- l -->
Advice for Microsoft’s new CEO: Go All-in with Apps
Good article on Linkedin today: [url=http&#58;//www&#46;linkedin&#46;com/today/post/article/20130905001513-24171-advice-for-microsoft-s-new-ceo-go-all-in-with-apps/url:1w1rqdj3]Advice for Microsoft’s new CEO: Go All-in with Apps[/url:1w1rqdj3]
Advice for Microsoft’s new CEO: Go All-in with Apps
Correct link: [url:ibfdeo83]http&#58;//www&#46;linkedin&#46;com/today/post/article/20130905001513-24171-advice-for-microsoft-s-new-ceo-go-all-in-with-apps[/url:ibfdeo83] BTW, here is another interesting article: <!-- m --><a class="postlink" href="http://www.theregister.co.uk/2013/09/05/smbs_to_be_windows_wallflowers/">http://www.theregister.co.uk/2013/09/05 ... llflowers/</a><!-- m --> [quote:ibfdeo83]This is where ISVs will find themselves temporarily stranded between the old world of desktop .exe install and the new world of apps:[b:ibfdeo83] Side-load license keys only come in packs of 100, and they're not transferrable.[/b:ibfdeo83] An ISV selling half a dozen licences at a time therefore can't buy a bunch of side-load licences and on-sell them, or even give them away for free, for client installations. For an outfit that lives by creating custom apps that tightly reflect the needs and often the IP of a specialised customer base, the [b:ibfdeo83]message right now is that they'll have to live in the world of old-style desktop installation and aren't welcome on the Windows 8.1 Start screen.[/b:ibfdeo83][/quote:ibfdeo83]
Advice for buying new PC
My pc (Windows 7) died... On that system, I need to do dayly stuff (internet, mail,...) and it is the system that I use for building my invoice program with FWH 18 That program is partly 16 bit (rebuilding in 32 bit) Not 64 bit, because in the office I have Win 7 32 computers I don't want Windows 10, because that is totaly different. Should I go for a Win 7 operation system ? That is no so easy to find anymore...
Advice for buying new PC
Marc I advise you to start using Windows 10 64 bits It does not have to have any problem. Since Windows 8 I have been using it and I am very happy with it. A computer with Windows 10, enough memory, a good graphics card with dedicated memory, an i5 or better i7, and SSD hard disk, will give you optimal performance. Sooner or later Microsoft will continue to move forward and, as has happened with previous operating systems, Windows 7 will disappear.
Advice for buying new PC
For FWH 32 bit it is no problem the 64 bit system ?
Advice for buying new PC
No, it is not. And if you don't like the new menu style of Win 10 you can get a Win 7 style one at Stardock.com.
Advice for buying new PC
Microsoft will not be supporting Windows 7. Everything must be Windows 10. It would be best to move to the current OS.
Advice for buying new PC
Hello Marc, switch your company and your development to "remote". Have a look at: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25121&hilit=serverbook">viewtopic.php?f=3&t=25121&hilit=serverbook</a><!-- l --> On your desktop you can use any OS. Best regards Otto On this server - connected to the internet over SIM card - is running: Apache HTTP Server: local newspaper, hotel web page, DMS and some other web pages WINDOWS Server RDP for 2 companies and my development environment. [img:2x9viudf]https&#58;//mybergland&#46;com/FWForum/serverbook&#46;jpg[/img:2x9viudf]
Advice needed
Hi, I'm trying to create a MDI window, that can open multiple MDI Child windows that each browse the same database (each window opens a new instance of the database and gives it a unique alias) I have tried to create my own class, and i call a :new() to open the windows/databases/browse etc. I am now adding a menu to the MDI window, but have the problem of knowing what window is highlighted and to which object the window refers to. My class stores the alias name of the browse and i was hoping to reference this in the action of the menu (oObject:cAlias->TICKET_NBR) but i don't know how to reference the Object that is selected. Any help will be appreciated Pete
Advice needed
oWnd:getActive() returns the active MDI child window (where oWnd is the main window). If you use database objects then you don't need to deal with aliases. Regards, James
Advice needed
I get the following error when i try to referene oWnd:GetActive() Error description: Warning BASE/1004 Message not found: TMDIFRAME:GETACTIVE - Please contact P & L Args: Stack Calls =========== Called from: C:\xHarbour\source\rtl\tobject.prg => TMDIFRAME:ERROR(172) Called from: C:\xHarbour\source\rtl\tobject.prg => TMDIFRAME:MSGNOTFOUND(205) Called from: C:\xHarbour\source\rtl\tobject.prg => TMDIFRAME:GETACTIVE(0) Called from: Scedmdi.prg => (b)SCHEDMDICHILDMENU(205) Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(437) Called from: C:\FWH\source\classes\window.prg => TWINDOW:COMMAND(1003) Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(241) Called from: => TMDIFRAME:HANDLEEVENT(0) Called from: C:\FWH\source\classes\window.prg => _FWH(3333) Called from: => WINRUN(0) Called from: C:\FWH\source\classes\window.prg => TWINDOW:ACTIVATE(952) Called from: ORD_MOD.PRG => MAIN(516)
Advice needed
I've solved my problem - i just pass Self to the menu function and i can then reference the aliases of the databases used. It was pretty obvious really, it's amazing what happens after you've had some sleep!!! Pete
Advice needed
or WndMain():oWndClient:getActive()
Advice needed
Another question, When a child closes, i would like the wondow to automatically retile the remaining child windows. I've tried to call :tile(.T.) on the valid of the child window, but i think that the app thinks the window is still open. Does anyone know how i can achieve this? Regards, Pete
Advice needed
>I've tried to call :tile(.T.) on the valid of the child window, but i think that the app thinks the window is still open. When the valid is called, the window IS still open--the window only closes after the valid is executed. You can try using a timer in the valid so it tiles after the window is closed. These issues are why I never use MDI windows. There is way too much effort for the user spent manipulating windows. A SDI interface like Outlook is much easier for the user. James
Advice needed
Thanks James, the timer did the trick <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Pete
Advice needed
Next question... If I have 3 tiled MDICHILD windows opened and i want to resort the order that they appear by dragging the bottom window above the second window, is there a way to call a tile when the mouse button is released? I've tried the bMoved option but, this is called as soon as the window is moved not when the mouse button is released. Any ideas? Thanks Pete
Advice needed
Try bLButtonUp. James
Advice needed about XBrowse usage!
Hi, I have two files. KART.dbf and NAMES.dbf (DBFCDX). Every record in KART.dbf has more than one records in NAMES.dbf (1 to N). All of fields is indexed. I run the test1.exe. I can switch the sort order by clicking the headers of first 3 columns. I can not sort 4th column, because its relation field. When I click the header of 4th column, I want to change the XBrowse contents and change the relation file another like view in test2.exe. How Can I change it in test1.prg like view in test2.prg? KART.dbf ------------------- id, Nümeric, AutoID (created by me) Ref1, Character Ref2, Character It has also indexes TAGs called ID, REF1, REF2 NAMES.dbf -------------------- id, Nümeric, AutoID (created by me) Kid, Nümeric (Relation field to KART.dbf. It includes id in KART.dbf) Name, Character It has also indexes TAGs called ID, KID, NAME KART.dbf includes data ---------------------------- 1, "Ref11", "Ref12" 2, "Ref21", "Ref22" 3, "Ref31", "Ref32" 4, "Ref41", "Ref42" NAMES.dbf includes data ---------------------------- 1, 1, "Albert" 2, 1, "John" 3, 2, "Hakan" 4, 2, "Smith" 5, 1, "Antonio" 6, 1, "Luiz" 7, 3, "Tommy" 8, 3, "Dave" [img:182x0dok]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/test1&#46;png[/img:182x0dok] test1.prg [code=fw:182x0dok]<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;">"XBrowse.Ch"</span> <br />REQUEST DBFCDX<br />PROCEDURE MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br /><br /><br />        USE NAMES <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> KID TAG KID<br />    <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">NAME</span> TAG <span style="color: #0000ff;">NAME</span><br />    SET ORDER <span style="color: #0000ff;">TO</span> TAG KID<br /><br />    USE KART <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> REF1 TAG REF1<br />    <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> REF2 TAG REF2<br />    SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">ID</span><br />    SET RELATION <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">ID</span> INTO NAMES<br />    GO TOP<br /><br />        <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd  <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Kart List"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">35.2</span>,<span style="color: #000000;">95</span> <br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd             ;<br />      COLUMNS <span style="color: #ff0000;">'ID'</span>, <span style="color: #ff0000;">'REF1'</span>, <span style="color: #ff0000;">'REF2'</span>    ;<br />      HEADERS <span style="color: #ff0000;">'ID'</span>,<span style="color: #ff0000;">'REF1'</span>,<span style="color: #ff0000;">'REF2'</span>              ;<br />      <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'KART'</span>                    ;<br />      AUTOSORT  <br />      <br />        oBrw:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">5</span><br />        oBrw:<span style="color: #000000;">lRecordSelector</span> := .f.<br />   <br />     <br />        ADD COLUMN <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">4</span> <span style="color: #00C800;">DATA</span> NAMES->NAME;<br />        HEADER <span style="color: #ff0000;">"FIRST NAME OF KART"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">135</span>           <br />        oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />        <br />        oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />        oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"I want to change the XBrowse like test2 view"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span></div>[/code:182x0dok] =========================================================== [img:182x0dok]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/test2&#46;png[/img:182x0dok] test2.prg [code=fw:182x0dok]<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;">"XBrowse.Ch"</span> <br />REQUEST DBFCDX<br />PROCEDURE MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br /><br />    USE KART <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> REF1 TAG REF1<br />    <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> REF2 TAG REF2<br />    SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">ID</span><br /><br />        USE NAMES <span style="color: #00C800;">NEW</span> EXCLUSIVE<br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">ID</span> TAG <span style="color: #0000ff;">ID</span><br />        <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> KID TAG KID<br />    <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">NAME</span> TAG <span style="color: #0000ff;">NAME</span><br />    SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">NAME</span><br /><br />    SET RELATION <span style="color: #0000ff;">TO</span> KID INTO KART<br />    <br />    GO TOP<br /><br />        <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd  <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Kart List (Sorted Name)"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">35.2</span>,<span style="color: #000000;">95</span> <br /><br />   @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd             ;<br />      COLUMNS <span style="color: #ff0000;">'NAME'</span>    ;<br />      HEADERS <span style="color: #ff0000;">'FIRST NAME OF KART'</span>              ;<br />      <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'NAMES'</span>                    ;<br />      AUTOSORT  <br /><br />        oBrw:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">5</span><br />        oBrw:<span style="color: #000000;">lRecordSelector</span> := .f.<br />   <br />     <br />        ADD COLUMN <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">1</span> <span style="color: #00C800;">DATA</span> KART->ID;<br />        HEADER <span style="color: #ff0000;">"ID"</span> <br />        oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />        <br />        ADD COLUMN <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">2</span> <span style="color: #00C800;">DATA</span> KART->REF1;<br />        HEADER <span style="color: #ff0000;">"REF1"</span> <br />        oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />        ADD COLUMN <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">3</span> <span style="color: #00C800;">DATA</span> KART->REF2;        <br />        HEADER <span style="color: #ff0000;">"REF2"</span> <br />        oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />        <br />        oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />        oWnd:<span style="color: #000000;">oClient</span>   := oBrw<br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE MMMMM<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"I want back to change the XBrowse like test1 view"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span></div>[/code:182x0dok] [url:182x0dok]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/relation&#46;rar[/url:182x0dok]
Advice needed about XBrowse usage!
Please try: [code=fw:2swpotym]<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;">"XBrowse.Ch"</span><br /><br />REQUEST DBFCDX<br /><br />FIELD <span style="color: #0000ff;">ID</span>, KID<br /><br />PROCEDURE MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oWnd, oBrw<br /><br />&nbsp; &nbsp;RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Assuming that indexes are already built</span><br /><br />&nbsp; &nbsp;USE NAMES <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG KID<br /><br />&nbsp; &nbsp;USE KART <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG <span style="color: #0000ff;">ID</span><br />&nbsp; &nbsp;SET RELATION <span style="color: #0000ff;">TO</span> <span style="color: #0000ff;">ID</span> INTO NAMES<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd &nbsp;<span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Kart List"</span> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>,<span style="color: #000000;">5</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">35.2</span>,<span style="color: #000000;">95</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">OF</span> oWnd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; FIELDS KART->ID, KART->REF1, KART->REF2, NAMES->NAME ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">'ID'</span>,<span style="color: #ff0000;">'REF1'</span>,<span style="color: #ff0000;">'REF2'</span>, <span style="color: #ff0000;">'FIRST NAME OF KART'</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; ORDERS <span style="color: #ff0000;">'ID'</span>, <span style="color: #ff0000;">'REF1'</span>, <span style="color: #ff0000;">'REF2'</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">'KART'</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nMarqueeStyle</span> &nbsp; &nbsp; := <span style="color: #000000;">5</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">lRecordSelector</span> &nbsp; := .f.<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">&#123;</span>|| MMMMM<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oWnd:<span style="color: #000000;">oClient</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oBrw<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br />PROCEDURE MMMMM<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cName := NAMES->NAME, nID := KART->ID<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oBrw:<span style="color: #000000;">cAlias</span> == <span style="color: #ff0000;">'KART'</span><br />&nbsp; &nbsp; &nbsp; KART-><span style="color: #000000;">&#40;</span> &nbsp;DbClearRelation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; NAMES-><span style="color: #000000;">&#40;</span> OrdSetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'NAME'</span> <span style="color: #000000;">&#41;</span>, DbSetRelation<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'KART'</span>, <span style="color: #000000;">&#123;</span> || KID <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">'KID'</span> <span style="color: #000000;">&#41;</span>, DbSeek<span style="color: #000000;">&#40;</span> cName <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">cAlias</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">'NAMES'</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">ID</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">Ref1</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp;:= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">Ref2</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp;:= <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; NAMES-><span style="color: #000000;">&#40;</span> DbClearRelation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, OrdSetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'KID'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; KART-><span style="color: #000000;">&#40;</span> &nbsp;DbSetRelation<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'NAMES'</span>, <span style="color: #000000;">&#123;</span> || <span style="color: #0000ff;">ID</span> <span style="color: #000000;">&#125;</span>, <span style="color: #ff0000;">'ID'</span> <span style="color: #000000;">&#41;</span>, DbSeek<span style="color: #000000;">&#40;</span> nID <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">cAlias</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := <span style="color: #ff0000;">'KART'</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #0000ff;">ID</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">'ID'</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">Ref1</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">'REF1'</span><br />&nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">Ref2</span>:<span style="color: #000000;">cSortOrder</span> &nbsp; &nbsp;:= <span style="color: #ff0000;">'REF2'</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span></div>[/code:2swpotym]
Advice needed about XBrowse usage!
Thanks nageswaragunupudi, I think This is my way to do this. When I run the prg, I noticed something. Is there any suggestion for it. If I click directly 4th column header there is no problem. But, if I click the Ref1 column header and then 4.th column It refresh the filter. There is no problem so far. Then I click the 4.th column header again, There is no KART.dbf data in the window. I could not understand it. Any Suggestion?
Advice needed about XBrowse usage!
Please change this code : [code=fw:18s8z3m6]<div class="fw" id="{CB}" style="font-family: monospace;">KART-><span style="color: #000000;">&#40;</span> &nbsp;DbClearRelation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:18s8z3m6] as [code=fw:18s8z3m6]<div class="fw" id="{CB}" style="font-family: monospace;">KART-><span style="color: #000000;">&#40;</span> &nbsp;DbClearRelation<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, OrdSetFocus<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'ID'</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:18s8z3m6]
Advice needed about XBrowse usage!
Thanks, It works now.
Advice needed about XBrowse usage!
Hello Horizon, would you be so kind to post the dbf and index files, too. Thanks in advance Otto
Advice needed about XBrowse usage!
Hi, This url is the same as my first message in this thread. [url:9vuaah1w]http&#58;//www&#46;objekt&#46;com&#46;tr/fwh_test/relation&#46;rar[/url:9vuaah1w]
Advice needed about printing Label Printers
Hi, I used to print my labels to my local printer from programs like below. First I create a new file from my template file and then print like that [code=fw:3duv62tm]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WinExec<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"cmd /c YAZ.BAT"</span><span style="color: #000000;">&#41;</span></div>[/code:3duv62tm] YAZ.BAT [code=fw:3duv62tm]<div class="fw" id="{CB}" style="font-family: monospace;">TYPE NewFile.PRN > PRN</div>[/code:3duv62tm] I need to write my NewFile.PRN without using winexec and Batch file to label printers defined in Control Panel of Windows. How Can I do it? Thanks in advance.
Advice needed about printing Label Printers
xHarbour has a function PrintFileRaw(). Maybe that could help you [b:23ya0vgn]PrintFileRaw()[/b:23ya0vgn] Prints a file to a Windows printer in RAW mode. [b:23ya0vgn]Syntax[/b:23ya0vgn] [quote:23ya0vgn]PrintFileRaw( <cPrinterName>, ; <cFileName> , ; [<cJobTitle>] ) --> nErrorCode[/quote:23ya0vgn] [b:23ya0vgn]Arguments[/b:23ya0vgn] [i:23ya0vgn]<cPrinter> [/i:23ya0vgn] This is a character string holding the name of the printer to use for printing. [i:23ya0vgn]<cFileName> [/i:23ya0vgn] The file to print must be specified as a character string, including path and extension. If the path is omitted, the file is searched in the current directory. [i:23ya0vgn]<cJobTitle> [/i:23ya0vgn] This is an optional character string which appears as print job description in the spooler. It defaults to <cFileName>. Return The function returns 1 on success or a value less than zero on error. See the example for error codes. [b:23ya0vgn]Description[/b:23ya0vgn] Function PrintFileRaw() prints a file to a Windows printer in RAW mode. This restricts file types for printing to enhanced metafiles (EMF), ASCII text, and raw data, which includes all printer specific file types such as PostScript and PCL. The file is sent to the Windows spooler which processes the print job. The function returns zero when the file is successfully transferred to the spooler. Note that this is no guarantee for a printout. If the physical printer is out of paper, for example, the spooler reports an error to the user. This type of failure cannot be detected by PrintFileRaw(). [b:23ya0vgn]Example[/b:23ya0vgn] [code=fw:23ya0vgn]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">// The example prints a file in RAW mode and demonstrates</span><br /><span style="color: #B900B9;">// the possible return values of PrintFileRaw().</span><br /><br />   PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">LOCAL</span> cPrinter := GetDefaultPrinter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">LOCAL</span> cFile    := <span style="color: #ff0000;">"MyFile.Txt"</span><br />      <span style="color: #00C800;">LOCAL</span> nResult  := <span style="color: #000000;">-1</span><br />      <span style="color: #00C800;">LOCAL</span> cMsg     := <span style="color: #ff0000;">"PrintFileRaw(): "</span><br /><br />      CLS<br />      <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPrinter <span style="color: #000000;">&#41;</span><br />         ? <span style="color: #ff0000;">"No default printer found"</span><br />         QUIT<br />      <span style="color: #00C800;">ENDIF</span><br /><br />      nResult := PrintFileRaw<span style="color: #000000;">&#40;</span> cPrinter, cFile, <span style="color: #ff0000;">"Test for PrintFileRaw()"</span> <span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">SWITCH</span> nResult<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-1</span><br />         cMsg += <span style="color: #ff0000;">"Invalid parameters passed to function"</span> ; EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-2</span><br />         cMsg += <span style="color: #ff0000;">"WinAPI OpenPrinter() call failed"</span>      ; EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-3</span><br />         cMsg += <span style="color: #ff0000;">"WinAPI StartDocPrinter() call failed"</span>  ; EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-4</span><br />         cMsg += <span style="color: #ff0000;">"WinAPI StartPagePrinter() call failed"</span> ; EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-5</span><br />         cMsg += <span style="color: #ff0000;">"WinAPI malloc() of memory failed"</span>      ; EXIT<br />      <span style="color: #00C800;">CASE</span> <span style="color: #000000;">-6</span><br />         cMsg += <span style="color: #ff0000;">"File "</span> + cFile + <span style="color: #ff0000;">" not found"</span>          ; EXIT<br />      <span style="color: #00C800;">DEFAULT</span><br />         cMsg += cFile + <span style="color: #ff0000;">" PRINTED OK!!!"</span><br />      END<br /><br />      ? cMsg<br />   <span style="color: #00C800;">RETURN</span><br /> </div>[/code:23ya0vgn]
Advice needed about printing Label Printers
Thank you very much hua. It works.
Advice needed for reccount() in scopped and filtered dbfcdx.
I use this syntax to find out reccount for scoped and filtered dbfcdx file. [code=fw:mr9n3opj]<div class="fw" id="{CB}" style="font-family: monospace;">    <br />    USE MYFILE <span style="color: #0000ff;">INDEX</span> <span style="color: #ff0000;">"SSTAR"</span>    <br />    SET SCOPE <span style="color: #0000ff;">TO</span> DTOS<span style="color: #000000;">&#40;</span>xTARIH<span style="color: #000000;">&#41;</span>, DTOS<span style="color: #000000;">&#40;</span>xTARIH<span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span>SSART<span style="color: #000000;">&#41;</span><br />           SET FILTER <span style="color: #0000ff;">TO</span> &SSART <br />    <span style="color: #00C800;">ENDIF</span><br />    GO TOP<br />    nCount := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> !EOF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />        nCount++<br />        SKIP<br />        SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">ENDDO</span><br /> </div>[/code:mr9n3opj] Is there any other method to find out reccount? Thanks.
Advice needed for reccount() in scopped and filtered dbfcdx.
Hakan, you can try OrdKeyCount() but keep in mind that it doesn't respect filters, only scopes and index FOR clause conditions. EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
OrdKeyCount() respects not only scopes and (for cond indexes) but also filters. But it does not exclude deleted() records when set deleted on ( this is how we use normally ). So if we set filter to "SET FILTER TO !DELETED()" then the OrdKeyCount() excludes deleted records also.
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, [quote="nageswaragunupudi":3ashbuco]OrdKeyCount() respects not only scopes and (for cond indexes) but also filters.[/quote:3ashbuco] You're right! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Since the filter info is not contained in the index, then ordkeycount() would have to read all the records in the scope in order to determine those in the filter. This must be rather slow since it is all disk access. James
Advice needed for reccount() in scopped and filtered dbfcdx.
James, [quote="James Bott":185qi7rm]Since the filter info is not contained in the index, then ordkeycount() would have to read all the records in the scope in order to determine those in the filter. This must be rather slow since it is all disk access.[/quote:185qi7rm] This is true... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
[quote:2q8kgv78]would have to read all the records[/quote:2q8kgv78] Not at all so with the present day optimized filters in DBFCDX and other advanced RDDs Decades back we were working with Clipper with DBFNDX, DBFNTX RDDs. Those days if a filter is set, RDD reads all records and skips filtered and deleted records. Yes, that was deadly slow. Gurus used to say avoid filters like plague. Then Foxpro came up with Rushmore technology, introducing bitmapped filtering technique, initially optimized with the help of indexes. That changed the entire scenario. Filtering was lightning fast. Comix and SIX RDDs came into market providing the same technology for Clipper. Now no limits on filtering. Later Clipper bought Comix from Loadstone and incorporated the same in DBFCDX in Clipper 5.3, though Clipper's adoption is less powerful than the original Comix. Present 32-bit (x)Harbour also provide the same functionality. OrdKeyCount() even with filters is very fast and does not have to read all records in the scope.
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, I don't think filters are fast with standard xHarbour's DBFCDX. But I strongly hope to be wrong... EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Nages, Thanks for the explanation. [quote:ddra5knz]OrdKeyCount() even with filters is very fast and does not have to read all records in the scope.[/quote:ddra5knz] I would think this would have to be "may not" instead of "does not." If, information in the filter is not contained in any of the indexes, then I don't see how it could avoid reading all the records in the scope. James
Advice needed for reccount() in scopped and filtered dbfcdx.
Hello, In a dbf with about 50.000 records, Harbour and RDDCDX filters are slow, and much more in a network scenario. In network mode, I just do: [code=fw:3nbqkgic]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; SET EXCLUSIVE OFF<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span>cMyPath+<span style="color: #ff0000;">"AUXILIAR"</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #00C800;">NEW</span> &nbsp;<span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"AUXILIAR"</span><br />&nbsp; &nbsp;AUXILIAR-><span style="color: #000000;">&#40;</span>OrdSetFocus<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"AUXILIAR1"</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>[/code:3nbqkgic] Maybe I am missing something. Thank you.
Advice needed for reccount() in scopped and filtered dbfcdx.
Instead of 50,000 records let us test on 100.000 records (approx). Please compile and run this program: Copy \fwh\samples\customer.dbf to the folder where the exe is located. Or build this program in \fwh\samples folder. [code=fw:2cxuyj34]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> TestFilter<br /><br />&nbsp; &nbsp;field AGE, STATE, CITY<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nSecs, nCount<br /><br />&nbsp; &nbsp;SET EXACT OFF<br />&nbsp; &nbsp;SET DELETED <span style="color: #0000ff;">ON</span><br />&nbsp; &nbsp;SET EXCLUSIVE OFF<br /><br />&nbsp; &nbsp;RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//---</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Start Building 100,000 recs dbf"</span><br /><br />&nbsp; &nbsp;USE CUSTOMER EXCLUSIVE<br />&nbsp; &nbsp;COPY <span style="color: #0000ff;">TO</span> CUST100<br />&nbsp; &nbsp;CLOSE <span style="color: #00C800;">DATA</span><br />&nbsp; &nbsp;USE CUST100 EXCLUSIVE<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">199</span><br />&nbsp; &nbsp; &nbsp; APPEND <span style="color: #0000ff;">FROM</span> CUSTOMER<br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp;CLOSE <span style="color: #00C800;">DATA</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Index big dbf"</span><br />&nbsp; &nbsp;USE CUST100 EXCLUSIVE<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> AGE TAG AGE<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> STATE TAG STATE<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span>CITY<span style="color: #000000;">&#41;</span> TAG CITY<br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> TAG DELETED<br />&nbsp; &nbsp;CLOSE <span style="color: #00C800;">DATA</span><br /><br /><span style="color: #B900B9;">//-----</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Open BigDbf"</span><br />&nbsp; &nbsp;USE CUST100 <span style="color: #00C800;">NEW</span> SHARED<br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Apply filter and get count"</span><br />&nbsp; &nbsp;nSecs &nbsp; &nbsp;:= Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;SET FILTER <span style="color: #0000ff;">TO</span> AGE < <span style="color: #000000;">70</span> .AND. <span style="color: #000000;">&#40;</span> STATE = <span style="color: #ff0000;">"NY"</span> .OR. STATE = <span style="color: #ff0000;">"WA"</span> <span style="color: #000000;">&#41;</span> .AND. UPPER<span style="color: #000000;">&#40;</span>CITY<span style="color: #000000;">&#41;</span> < <span style="color: #ff0000;">"M"</span> .AND. ! DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;GO TOP<br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Filtered in "</span> + Str<span style="color: #000000;">&#40;</span> Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSecs <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" secs"</span><br /><br />&nbsp; &nbsp;nSecs &nbsp; &nbsp;:= Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nCount &nbsp; := OrdKeyCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;nSecs &nbsp; &nbsp;:= Seconds<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSecs<br /><br />&nbsp; &nbsp;FWDBG LastRec<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nCount, nSecs<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG STATE<br />&nbsp; &nbsp;GO TOP<br />&nbsp; &nbsp;XBROWSER <span style="color: #ff0000;">"CUST100"</span><br />&nbsp; &nbsp;CLOSE <span style="color: #00C800;">DATA</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2cxuyj34] Check the time taken to execute OrdKeyCount() and experience the xbrowse. I built the program with Harbour. It took 0.40 seconds (less than 1/2 second) to count 1400 filtered records in a total 99,200 records. Do we still say that the RDD "reads all records" for counting ?
Advice needed for reccount() in scopped and filtered dbfcdx.
[quote:w5nefj71] If, information in the filter is not contained in any of the indexes, then I don't see how it could avoid reading all the records in the scope.[/quote:w5nefj71] Filter information is never stored in indexes. RDD builds a record list (whatever name it is called) of which each bit represents one record. RDD sets on and off the bits evaluating the filter condition based on index expressions and index values. Where the filter condition is not fully optimized, RDD scans the remaining records (maybe's) and eliminates filtered records. This is normally done as and when required. OrdKeyCount() also forces this operation. Finally counting filtered records is only counting "on" bits of the internal list. DBFCDX RDD (and some other advanced RDDs) basically has good optimization capabilities. It is for the programmer to make the best use of these capabilities. 1. Do not use aliases in index experssions or filter expressions. INDEX ON STATE is better than INDEX ON CUST->STATE or INDEX ON FIELD->STATE 2. Do not use memory variables or UDFs in the filter experssions. Instead use literal constants. 3. Left side of a comparison expression should match exactly an index expression. When there is an index on UPPER(CITY), better we use UPPER(CITY) < "M" than CITY < "M" 4. If the filter expression contains optimzable and not optimizable expressions, let us start with optimizable expressions first. If some expressions result in fewer filtered records then let us have such experssions first. (I am not very sure how our RDD works, but this is by long years of experience in building where/filter clauses on large RDBMSs) 5) If targetting networked environments, keep the size of index files to the minimum. This is very important
Advice needed for reccount() in scopped and filtered dbfcdx.
Dear Mr. Nages, Thank you very much for your indications. And, wouldn´t be better for performance to SET DELETED OFF and create indexes like [code=fw:3uyup4eo]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->CODIGO TAG EMISOR1 &nbsp;<span style="color: #00C800;">FOR</span> !Deleted<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:3uyup4eo] ?. (or INDEX ON CODIGO TAG EMISOR1 [b:3uyup4eo]FOR !Deleted()[/b:3uyup4eo])?. Thank you.
Advice needed for reccount() in scopped and filtered dbfcdx.
Thank you I have solved my problem like that [code=fw:3ipuyb6j]<div class="fw" id="{CB}" style="font-family: monospace;">    USE MYFILE <span style="color: #0000ff;">INDEX</span> <span style="color: #ff0000;">"SSTAR"</span>    <br />    SET SCOPE <span style="color: #0000ff;">TO</span> DTOS<span style="color: #000000;">&#40;</span>xTARIH<span style="color: #000000;">&#41;</span>, DTOS<span style="color: #000000;">&#40;</span>xTARIH<span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">IF</span> !Empty<span style="color: #000000;">&#40;</span>SSART<span style="color: #000000;">&#41;</span><br />           SSART += <span style="color: #ff0000;">" .AND. !DELETED()"</span><br />           SET FILTER <span style="color: #0000ff;">TO</span> &SSART <br />    <span style="color: #00C800;">ENDIF</span><br />    GO TOP<br />    nCount := OrdKeyCount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>[/code:3ipuyb6j] This is more faster than my old code.
Advice needed for reccount() in scopped and filtered dbfcdx.
Conditional indexes are not used for optimizing filters. It does not make any difference whether SET DELETED is OFF or ON for indexing. Create normal non-conditional indexes on the disk. [code=fw:1ccvjtf5]<div class="fw" id="{CB}" style="font-family: monospace;">field CITY  <span style="color: #B900B9;">// declaration like local, static, etc</span><br /><br /><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span>CITY<span style="color: #000000;">&#41;</span> TAG CITY <span style="color: #B900B9;">// Please note: I am not using FIELD->CITY</span></div>[/code:1ccvjtf5] For every large table, create one TAG as a matter of routine: [code=fw:1ccvjtf5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> TAG DELETED</div>[/code:1ccvjtf5] When we do not need any filter use SET FILTER TO !DELETED() When we need a filter, suffix " .AND. !DELETED()" to the filter condition: SET FILTER TO <condition> .AND. !DELETED() We may create conditional indexes on a temporary basis at runtime only to improve navigation speeds for browses.
Advice needed for reccount() in scopped and filtered dbfcdx.
Dear Mr. Nages, From previous posts from you I understood that SET DELETED ON in a network scenareo and xBrowse causes some delay, so that´s the reason to include the For !Deleted() clause on the index command. Is it correct?. Thank you.
Advice needed for reccount() in scopped and filtered dbfcdx.
This sample: [code=fw:3p7hmbuq]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST DBFCDX<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nSec, nKey<br /><br />&nbsp; &nbsp; RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CORSE.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; USE CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> DTOS<span style="color: #000000;">&#40;</span> FIELD -> <span style="color: #00C800;">data</span> <span style="color: #000000;">&#41;</span> + UPPER<span style="color: #000000;">&#40;</span> FIELD -> cliente <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; CLOSE<br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; USE CORSE <span style="color: #0000ff;">INDEX</span> CORSE<br /><br />&nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> FIELD -> cliente = <span style="color: #ff0000;">"A"</span><br /><br />&nbsp; &nbsp; nSec = SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; nKey = ORDKEYCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSec, nKey<br /><br />&nbsp; &nbsp; CLOSE<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:3p7hmbuq] displays this without filter [code=fw:3p7hmbuq]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0.00</span> &nbsp; &nbsp; <span style="color: #000000;">910404</span></div>[/code:3p7hmbuq] and this with filter: [code=fw:3p7hmbuq]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2.20</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">58776</span></div>[/code:3p7hmbuq] So I don't see any optimization... <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Enrico, Hmm, you can't compare with and without a filter to see optimization. It seems you would have to compare the filter compiled with xHarbour (with optimization) v.s. Clipper (without optimization). James
Advice needed for reccount() in scopped and filtered dbfcdx.
James, understood. Can't test with Clipper anymore, sorry. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Because this filter [code=fw:dcdkb9vt]<div class="fw" id="{CB}" style="font-family: monospace;">SET FILTER <span style="color: #0000ff;">TO</span> FIELD -> cliente = <span style="color: #ff0000;">"A"</span></div>[/code:dcdkb9vt] can not be optimized at all. As I said earlier, DBFCDX provides capabilities of optimization, provided the programmer wants to avail the benefits of these capabilities. In this case we can not say DBFCDX is slow. If there is an index on CLIENTE then SET FILTER TO CLIENTE = "A" can be fully optimized. If there is an index on UPPER(CLIENTE) then SET FILTER TO UPPER(CLIENTE) = 'A' can be fully optimized. The guidelines I indicated above to set optimized filters/where clauses are universal and are applicable to all RDBMSs as well.
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, [quote="nageswaragunupudi":puf307ci]If there is an index on CLIENTE then SET FILTER TO CLIENTE = "A" can be fully optimized. If there is an index on UPPER(CLIENTE) then SET FILTER TO UPPER(CLIENTE) = 'A' can be fully optimized.[/quote:puf307ci] If I had an index on UPPER(CLIENTE) I wouldn't need of filters at all. I would just use scopes. We can't have an index for any possible filter. EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Enrico, Consider: Assuming there is an index on client, then this should be optimized: set filter to client ="A" .or. client="M" And I don't think you can do this with scopes. James
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, [quote="nageswaragunupudi":37h56xdu]If there is an index on CLIENTE then SET FILTER TO CLIENTE = "A" can be fully optimized. If there is an index on UPPER(CLIENTE) then SET FILTER TO UPPER(CLIENTE) = 'A' can be fully optimized.[/quote:37h56xdu] I don't see any speed improvement in the modified sample below. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> [code=fw:37h56xdu]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST DBFCDX<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nSec, nKey<br /><br />&nbsp; &nbsp; RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CORSE.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; USE CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span> FIELD -> cliente <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; CLOSE<br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; USE CORSE <span style="color: #0000ff;">INDEX</span> CORSE<br /><br />&nbsp; &nbsp; nSec = SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> UPPER<span style="color: #000000;">&#40;</span> FIELD -> cliente <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br /><br />&nbsp; &nbsp; nKey = ORDKEYCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSec, nKey<br /><br />&nbsp; &nbsp; CLOSE<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:37h56xdu] EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
James, [quote="James Bott":1k4qs7e9]Consider: Assuming there is an index on client, then this should be optimized: set filter to client ="A" .or. client="M" And I don't think you can do this with scopes.[/quote:1k4qs7e9] Assuming that the filter above could be optimized, it would only be a specific case. Imagine a dialog full of GETs. You want your user to search on any fields and combinations. You just can't create such a number of indexes, can you? EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Enrico, [quote:3gdm2f88]You want your user to search on any fields and combinations.[/quote:3gdm2f88] Agreed, but I don't see any logical way you can search for any combination of fields in a filter without reading all the records for at least some of the combinations. I think the point is, that some filters will be optimized if there is a useful index. And this is better than no optimization ever--which was the old way. You also have to consider probability. There are a few combinations of fields that users will search often, and some that they will never search. Think of the 80/20 rule-- 20% of the combinations will be searched 80% of the time. You could log the searches for awhile, then make sure you have indexes that will help in those 20% of the cases. Hmm, now if you wanted to get really sophisticated, you could build a routine that automatically tracks the searches and then designs indexes to speed them up. I like it.
Advice needed for reccount() in scopped and filtered dbfcdx.
Will you kindly try this sample as it is without changes? [code=fw:13x85r8o]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST DBFCDX<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; FIELD CLIENTE<br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nSec, nKey<br /><br />&nbsp; &nbsp; RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br /><br />&nbsp; &nbsp; FERASE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CORSE.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp; USE CORSE EXCLUSIVE<br />&nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span>CLIENTE<span style="color: #000000;">&#41;</span> TAG CLIENTE<br />&nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> TAG DELETED<br />&nbsp; &nbsp; CLOSE<br /><br />&nbsp; &nbsp; USE CORSE SHARED<br /><br />&nbsp; &nbsp; nSec = SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> UPPER<span style="color: #000000;">&#40;</span>CLIENTE<span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span> .AND. !DELETED<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; nKey = ORDKEYCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSec, nKey<br /><br />&nbsp; &nbsp; CLOSE<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:13x85r8o]
Advice needed for reccount() in scopped and filtered dbfcdx.
James, [quote="James Bott":1izjss20]Agreed, but I don't see any logical way you can search for any combination of fields in a filter without reading all the records for at least some of the combinations.[/quote:1izjss20] I've always used conditional indexes created "on the fly" with very good results. The searches demanded by my clients are normally very complex, requiring functions calls inside the key and the FOR conditions. EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, [quote="nageswaragunupudi":1f5773e3]Will you kindly try this sample as it is without changes?[/quote:1f5773e3] Yes, there is a speed improvement: OLD [code=fw:1f5773e3]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">2.20</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">58776</span></div>[/code:1f5773e3] NEW [code=fw:1f5773e3]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1.84</span> &nbsp; &nbsp; &nbsp;<span style="color: #000000;">58776</span></div>[/code:1f5773e3] This is my modified sample: [code=fw:1f5773e3]<div class="fw" id="{CB}" style="font-family: monospace;">REQUEST DBFCDX<br /><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">LOCAL</span> nSec, nKey<br /><br />&nbsp; &nbsp; RDDSETDEFAULT<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> !FILE<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"CORSE.CDX"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; USE CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span> FIELD -> cliente <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">TO</span> CORSE<br />&nbsp; &nbsp; &nbsp; &nbsp; CLOSE<br />&nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp; USE CORSE <span style="color: #0000ff;">INDEX</span> CORSE<br /><br />&nbsp; &nbsp; SET ORDER <span style="color: #0000ff;">TO</span> <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; nSec = SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; SET FILTER <span style="color: #0000ff;">TO</span> UPPER<span style="color: #000000;">&#40;</span> FIELD -> cliente <span style="color: #000000;">&#41;</span> = <span style="color: #ff0000;">"A"</span><br /><br />&nbsp; &nbsp; nKey = ORDKEYCOUNT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; ? SECONDS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - nSec, nKey<br /><br />&nbsp; &nbsp; CLOSE<br /><br />&nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:1f5773e3] As you can see, the only required change is SET ORDER TO 0. EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
I would explain that my new sample is as fast as your. So nothing related to optimizations. <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( --> EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
Mr EMG You modified my code. For once please compile my code exactly as it is without changing even a single alphabet and then see the difference. I guarantee a difference in speed. BTW may I know the total number of records? Or please send me your dbf ziipped.
Advice needed for reccount() in scopped and filtered dbfcdx.
Rao, [quote="nageswaragunupudi":dgqfvcir]You modified my code.[/quote:dgqfvcir] No, I run your sample as is and I got 1.84. Then I changed my original sample and I got the same speed. [quote="nageswaragunupudi":dgqfvcir]BTW may I know the total number of records?[/quote:dgqfvcir] Is in my first message: 910404 EMG
Advice needed for reccount() in scopped and filtered dbfcdx.
I love a lively discussion. I always learn something new. James
Advice on image capture needed.
Hi,One of our clients have asked if we could capture an image from their cctv system. We have asked the cctv company for details on how to do this and they sent the following reply:[quote:3v3a5m5m]We can confirm that there is currently a camera viewing the Weighbridge connected to the CCTV System. In our recent visit the Engineer installed a Video Splitter Unit which now feeds an image from this camera into the On Site Digital Video Recorder and a further output which is now available for your own purpose of inserting a cameo onto the Weighbridge data. This output is terminated with a BNC plug on an approximate three metre lead in preparation to connect to a composite video card that would be required on the PC for this purpose.[/quote:3v3a5m5m]Has anyone else done anything similar to this and have any advice on retrieving an image from a video card?Thanks in advancePete
Advice on image capture needed.
Peter,This code will help you to manage a webcam:<!-- w --><a class="postlink" href="http://www.fivetechsoft.com/files/utilities/608webcam_harbour_xharbour.zip">www.fivetechsoft.com/files/utilities/60 ... arbour.zip</a><!-- w -->
Advice on image capture needed.
AntonioWhen I try to open the file I receive the following message:"The compressed (zipped) folder is invalid or corrupted"Regards,George
Advice to a newby.
Hi,I am a very newby at FWH and Harbour. I am a litte bit confused about data entry forms. I could not make decision which one should i use? WINDOW or DIALOG. The same sample with one get and one button results different views. I have also need the manual of Borland Resource Workshop (english) and advice about its usage. Sorry for my english.ThanksRegards,
Advice to a newby.
[quote="Horizon":24uz2bxc]Hi, I am a very newby at FWH and Harbour. I am a litte bit confused about data entry forms. I could not make decision which one should i use? WINDOW or DIALOG. The same sample with one get and one button results different views.[/quote:24uz2bxc] Generally speaking, DIALOGs are for non-resizeable data entry forms and WINDOWs are for main window and for resizeable single or multiple document view. [quote="Horizon":24uz2bxc]I have also need the manual of Borland Resource Workshop (english) and advice about its usage.[/quote:24uz2bxc]Run BRW then press F1.EMG
Advice to a newby.
Thanks Enrico.
Advise
To All I have just begun using FWPPC and would like to know - Is it better to use resource workshop or manually build dialogs and controls - I have created a dialog with BRW and have a static say 'Client ID' but when testing it only displays 'Client' - which leads to my second question - is it better to have the PDA to test on or is the emulator just as good. What font and font size is recommended. I also created a edit field and set for right justification for a numeric input but the cursor stays on the left side. Cheers Colin
Advise
Colin, You may use free Pelles C IDE to create dialog for Pocket PC. When you run your applications real device is good choice to test them. In my projects default font is System 10. This is larger font than default (8) but it's more readable for users. Sample dialog: [code:20uzn9du] #include "c&#58;\vce\include\arm\windows&#46;h" #include "c&#58;\vce\include\arm\commctrl&#46;h" DOKHEAD DIALOG DISCARDABLE 0, 0, 136, 154 STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE CAPTION "Nag&#322;&#46;dokumentu" FONT 10, "System" BEGIN CONTROL "Klient&#58;", 1001, "Static", SS_RIGHT|WS_GROUP, 0, 2, 22, 11 CONTROL "Data wyst&#58;", 1002, "Static", SS_RIGHT|WS_GROUP, 0, 24, 36, 11 CONTROL "Sp&#46; zap&#322;&#58;", 1003, "Static", SS_RIGHT|WS_GROUP, 0, 36, 36, 11 CONTROL "Termin&#58;", 1004, "Static", SS_RIGHT|WS_GROUP, 0, 49, 36, 11 CONTROL "Realiz&#58;", 1005, "Static", SS_RIGHT|WS_GROUP, 0, 61, 36, 11 CONTROL "Upust&#58;", 1006, "Static", SS_RIGHT|WS_GROUP, 0, 73, 36, 11 CONTROL "W&#46;netto&#58;", 1007, "Static", SS_RIGHT|WS_GROUP, 0, 85, 36, 11 CONTROL "Ulica&#58;", 1008, "Static", SS_RIGHT|WS_GROUP, 0, 109, 24, 11 CONTROL "Pna/M&#58;", 1009, "Static", SS_RIGHT|WS_GROUP, 0, 121, 24, 11 CONTROL "", 1010, "Edit", ES_MULTILINE|ES_AUTOVSCROLL|ES_UPPERCASE|ES_READONLY|WS_VSCROLL|WS_BORDER, 22, 2, 112, 21 CONTROL "", 1011, "Edit", ES_AUTOHSCROLL|ES_READONLY|WS_BORDER, 36, 24, 50, 11 CONTROL "", 1012, "Edit", ES_AUTOHSCROLL|ES_READONLY|WS_BORDER, 88, 24, 40, 11 CONTROL "", 1013, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 36, 36, 50, 40 CONTROL "", 1014, "Edit", ES_RIGHT|ES_NUMBER|ES_AUTOHSCROLL|ES_READONLY|WS_BORDER, 102, 36, 26, 11 CONTROL "", 1015, "SysDateTimePick32", WS_TABSTOP|0x00800000, 36, 49, 50, 11 CONTROL "+", 1016, "Button", WS_TABSTOP, 88, 49, 12, 11 CONTROL "-", 1017, "Button", WS_TABSTOP, 102, 49, 12, 11 CONTROL "0", 1018, "Button", WS_TABSTOP, 116, 49, 12, 11 CONTROL "", 1019, "SysDateTimePick32", WS_TABSTOP|0x00800000, 36, 61, 50, 11 CONTROL "+", 1020, "Button", WS_TABSTOP, 88, 61, 12, 11 CONTROL "-", 1021, "Button", WS_TABSTOP, 102, 61, 12, 11 CONTROL "K", 1022, "Button", WS_TABSTOP, 116, 61, 12, 11 CONTROL "", 1023, "Edit", ES_RIGHT|ES_NUMBER|ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 36, 73, 32, 11 CONTROL "+", 1024, "Button", WS_TABSTOP, 88, 73, 12, 11 CONTROL "-", 1025, "Button", WS_TABSTOP, 102, 73, 12, 11 CONTROL "", 1026, "Edit", ES_RIGHT|ES_NUMBER|ES_AUTOHSCROLL|ES_READONLY|WS_BORDER, 36, 85, 48, 11 CONTROL "", 1027, "Edit", ES_RIGHT|ES_NUMBER|ES_AUTOHSCROLL|ES_READONLY|WS_BORDER, 86, 85, 48, 11 CONTROL "Obliczenia od cen brutto", 1028, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 36, 97, 98, 11 CONTROL "", 1029, "Edit", ES_AUTOHSCROLL|ES_UPPERCASE|ES_READONLY|WS_BORDER, 24, 109, 110, 11 CONTROL "", 1030, "Edit", ES_AUTOHSCROLL|ES_UPPERCASE|ES_READONLY|WS_BORDER, 24, 121, 32, 11 CONTROL "", 1031, "Edit", ES_AUTOHSCROLL|ES_UPPERCASE|ES_READONLY|WS_BORDER, 58, 121, 76, 11 CONTROL "Uwagi", 1032, "Button", WS_TABSTOP, 28, 138, 34, 12 CONTROL "<<", 1033, "Button", WS_TABSTOP, 64, 138, 34, 12 CONTROL "Zapisz", 1034, "Button", WS_TABSTOP, 100, 138, 34, 12 END [/code:20uzn9du] Regards Pawel
Advise
[quote="Colin Haig":1npsbcaa]Is it better to use resource workshop or manually build dialogs and controls[/quote:1npsbcaa] Resource editor is better, as usual. But I'm not using it at the moment because I found strange differences in the results on the emulator and on the real device. At least using BRW. [quote="Colin Haig":1npsbcaa]- I have created a dialog with BRW and have a static say 'Client ID' but when testing it only displays 'Client'[/quote:1npsbcaa] We might need of a working RESIZE16 clause as in FWH. Antonio? [quote="Colin Haig":1npsbcaa]- which leads to my second question - is it better to have the PDA to test on or is the emulator just as good.[/quote:1npsbcaa] I haven't a PDA. The emulator seems to work fine and the development is faster as you don't have to upload the EXE in the device after each compilation. But yes, you should make at least a final test on the real PDA. [quote="Colin Haig":1npsbcaa]What font and font size is recommended.[/quote:1npsbcaa] I usually don't use a specific font (ie. the default system font is used). [quote="Colin Haig":1npsbcaa]I also created a edit field and set for right justification for a numeric input but the cursor stays on the left side.[/quote:1npsbcaa] Yes, this is a bug of FWPPC, still unresolved. Antonio? EMG
Advise
[quote="EnricoMaria":11th0zal][quote="Colin Haig":11th0zal]Is it better to use resource workshop or manually build dialogs and controls[/quote:11th0zal] Resource editor is better, as usual. But I'm not using it at the moment because I found strange differences in the results on the emulator and on the real device. At least using BRW. [quote="Colin Haig":11th0zal]- I have created a dialog with BRW and have a static say 'Client ID' but when testing it only displays 'Client'[/quote:11th0zal] We might need of a working RESIZE16 clause as in FWH. Antonio? [quote="Colin Haig":11th0zal]- which leads to my second question - is it better to have the PDA to test on or is the emulator just as good.[/quote:11th0zal] I haven't a PDA. The emulator seems to work fine and the development is faster as you don't have to upload the EXE in the device after each compilation. But yes, you should make at least a final test on the real PDA. [quote="Colin Haig":11th0zal]What font and font size is recommended.[/quote:11th0zal] I usually don't use a specific font (ie. the default system font is used). [quote="Colin Haig":11th0zal]I also created a edit field and set for right justification for a numeric input but the cursor stays on the left side.[/quote:11th0zal] Yes, this is a bug of FWPPC, still unresolved. Antonio? EMG[/quote:11th0zal] Thanks Enrico for your reply - as I am just starting I might try Pelles RE as suggested by Palewu - I also dont have a PDA but if there was going to be a great variation between the PDA and emulator I would get a PDA. Regards Colin
Advise
Enrico, > We might need of a working RESIZE16 clause as in FWH. Antonio? If it is needed then we will implement it <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> > Yes, this is a bug of FWPPC, still unresolved. Antonio? We found it as a side effect when using a PICTURE. Afaik if you remember the picture, then the right side style was working fine. We didn't find yet whats the relation between them
Advise
Colin, > to be a great variation between the PDA and emulator It may depend on what PDA you may use. We use a HP IPAQ and the emulator and the PDA look exactly the same
Advise in Server hardware
I finaly found a guy that did a setup of server 2019 for remote desktop so that I can test running on this kind of server (comming from Peer to Peer) Afther the 120 day trial I need to setup a final system and here I would like your advise : I know somewhat windows desktops and a I7 if faster I5 and 32 ram beter that 16 ... But Server hardware seems to be totaly different because they need more secure, better hardware, all better. If that is so, I can live with that and am willing to pay for it, but when not knowing, when is there hardware overkill ? I'm using a type FW system with lot of data transfers from DBF into Xbrowsers... Will these servers machines run significant faster than the type high laptop/desktop They offered a systhem for 3.500 euro like this PowerEdge T150 Chassis 4 x 3.5in Cabled 2x 480GB SSD Intel Xeon E-2314 16GB Dual-Port 1GbE S150 Software RAID-controller iDRAC9 Enterprise 3 Year ProSupport 5x Windows Server 2022 RDS USER CALs 5x Windows Server 2022 USER CALs 1x Windows Server 2022 Standard ROK 16CORE I bought a year ago a Laptop with high specs (like Otto adviced) for 1400 euros, but this system was not used and rapid claimed by the family for playing the heavy games ))) I could buy again a high performances laptop, +- 1500 and start using this. and finaly I saw a offer for this kind of machine : Dell Precision 7920 for around 2.900 euro (here some hardware like to much nVidia could be erased. Chassis Dell Precision 7920 CPU 2x Intel Xeon Gold 6130 - 16C/24T, 2.70-3.70Ghz, 22MB Cache, 125W Mem 256GB DDR4, 16x 16GB PC4-2666 RAID-Controller PERC H730 Mini Mono GPU 3x Nvidia Quadro M4000 8GB GDDR5 Frontbezel 1x Dell Frontbezel Faceplate Power Supply 2x 1100W 80+ Platinum Hotswap PSU Rack Rails 1x Rackrails R740/ 7920
Advise in Server hardware
I also see the exsistence of 10 Gig network cards. This will speed things up also with the correct other hardware ?
Advise in Server hardware
Marc, It really depends on how much demand you have. My clients are small businesses and they run from 2 - 20 workstations. Most are using a Windows 11 computer. You will get excellent results from a Windows 11 computer, with a 512 GB SSD and a 1 TB drive, plus 16GB of RAM. Most computers have Gigabyte network cards. Of course you need more if you are going to run multiple applications all day long with multiple workstations, plus handling your phone system, and with an email / web server. But likely that is not what you need. Just to see how well things can work, I purchased a super mini computer in a box. It runs Windows 11 Pro ( included ) and has a new Celeron processor, 512 GB SSD, 8 GB RAM, for under $ 200 after applying the discount code ( <!-- m --><a class="postlink" href="https://www.amazon.com/dp/B0BLZF36JH?psc=1&ref=ppx_yo2ov_dt_b_product_details">https://www.amazon.com/dp/B0BLZF36JH?ps ... ct_details</a><!-- m --> ). I installed Advantage Database Server on it, and my program. It is a tiny box, but it does a great job. I am testing it as a server, and my client software accesses it on a Gigabit network. It is very fast and has absolutely no problems. I'm going to even try to set it up to access via the internet. My point is that the power of the server really depends on what type of load you will place on it. My clients could actually enter data all day long on that tiny little box, and it in their real world setting ( especially for 3-5 workstations ), it would likely perform up to their expectations. Of course they make them with i5 and i7 processors, and more RAM, and they would be even better. My point is that you don't need to spend a lot of money and have a big powerful server. Usually that only helps the hardware seller unless you are on some huge operation.