topic
stringlengths
1
63
text
stringlengths
1
577k
leer gps en tablet samgung ativ 5
Buenos días compañeros Existe alguna forma de leer las coordenadas gps ( longitud, latitud ) en una Tablet de estas características con fw? o con Harbour ? se agradece cualquier ayuda saludos
leer mensajes
alguien sabe de donde puedo leer los mensaje posteados en el foro que habia de fivetechsoft? gracias Paco
leer mensajes
Paco, Los tenemos en DBFs. Podemos subirlos a <!-- w --><a class="postlink" href="http://www.hyperupload.com">www.hyperupload.com</a><!-- w --> para que quien quiera los descargue.
leer mensajes
Paco, Aquí estan: <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=2788">http://fivetechsoft.com/forums/viewtopic.php?t=2788</a><!-- m -->
leer mensajes
Gracias Antonio <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> inmejorable experiencia salu2 Paco
leer/escribir en puertos USB como?
Eso. Gracias.
leer/escribir en puertos USB como?
Gustavo, Aqui tienes una explicación completa: <!-- m --><a class="postlink" href="http://www.delcomproducts.com/downloads/USBPRGMNL.pdf">http://www.delcomproducts.com/downloads/USBPRGMNL.pdf</a><!-- m --> Aunque es para un USB de un fabricante específico, la forma de usarlos es muy similar. Si buscas en google por USB CreateFile encontraras muchos ejemplos.
leer/escribir en puertos USB como?
a lo mejor este link te puede servir [url:13cp1iop]http&#58;//libusb-win32&#46;sourceforge&#46;net/#news[/url:13cp1iop] suerte..
leer/escribir en puertos USB como?
Viendo. [quote="Antonio Linares":2kmjgp3q]Gustavo, Aqui tienes una explicación completa: <!-- m --><a class="postlink" href="http://www.delcomproducts.com/downloads/USBPRGMNL.pdf">http://www.delcomproducts.com/downloads/USBPRGMNL.pdf</a><!-- m --> Aunque es para un USB de un fabricante específico, la forma de usarlos es muy similar. Si buscas en google por USB CreateFile encontraras muchos ejemplos.[/quote:2kmjgp3q]
left justify and get
When the cursor is focus in a get that is a number get, its focus is right justify. This only happens on numbers and the resource id is set to left justification.
left justify and get
If you want to edit numbers left justified then convert them to string and back to numbers after the editing. EMG
left mouse button condition
How can you determine that the left mouse button is pressed (function MLeftDown always returns .F.) ?
left mouse button condition
oControl:bLClicked := { | nRow, nCol, nFlags | MsgInfo( "left mouse pressed" ) } or oWnd or oDlg instead of oControl
left mouse button condition
bRClicked - handles the event of pressing the left mouse button. But I'm interested in the status of this button when you move the mouse cursor across several controls. Each of these controls has its bMMoved in which the function is called. If left mouse button pressed, the function is executed
left mouse button condition
Then you have to use Windows function GetAsyncKeyState(): [url:3ith8kyt]https&#58;//msdn&#46;microsoft&#46;com/en-us/library/windows/desktop/ms646293(v=vs&#46;85)&#46;aspx[/url:3ith8kyt]
left mouse button condition
Thanks, Antonio !
leggere contatti di wm5 wm6 fwppc
ciao a tutti,come da titolo mi servirebbe un piccolo esempio di come posso leggere i contatti di wm5/wm6 e portarli in una tabella dbf chiaramente in FWPPCgrazie mille a tutti
leggere contatti di wm5 wm6 fwppc
scusate, nessuno riesce a leggere i contatti di poutlook di wm5/6?qualche dritta per favore....Grazie mille a tutti
leggere testhrb
potrei vedere il listato di test.hrb ? Come ?
leggere testhrb
Dear Silvio, Please review: [url:342uqfye]https&#58;//github&#46;com/harbour/core/blob/master/tests/readhrb&#46;prg[/url:342uqfye]
leggere testhrb
hi, for what are *.hrb File for <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
leggere testhrb
HRB files (Harbour Portable Object) contain pcode and the symbols table, so you can load them and run them, at runtime You can create them using harbour.exe with the -gh flag
leggere testhrb
Can I load a Hrb file (or more) where I insert some procedure or functions, from a fwh prg without use Harbour.exe ? Can you make a test here to compile ?
leggere testhrb
Dear Silvio, > Can I load a Hrb file (or more) where I insert some procedure or functions, from a fwh prg without use Harbour.exe ? yes > Can you make a test here to compile ? Please review hrb.prg and hrbext.prg in Harbour/tests folder
len( oqry) me devuelve mal un valor (creo)
Hola. La tabla "no tiene registros" y este codigo (mariadb) me devuelve que tengo 91, estoy intentando hacer un procedimiento para verificacion de usuario [code=fw:1a24ihy3]<div class="fw" id="{CB}" style="font-family: monospace;">  <span style="color: #00C800;">LOCAL</span> oQry, cSql<br /><br />   <span style="color: #0000ff;">TEXT</span> into cSql<br />   <span style="color: #0000ff;">Select</span><br />   *<br />   <span style="color: #0000ff;">FROM</span> tbautoriza AS a<br />   <span style="color: #0000ff;">WHERE</span> a.usuario = ?<br />   ENDTEXT<br /><br />   <span style="color: #B900B9;">//aca qyedi</span><br /><br />   oQry := ::<span style="color: #000000;">oCnx</span>:<span style="color: #000000;">QUERY</span><span style="color: #000000;">&#40;</span> cSql, <span style="color: #000000;">&#123;</span> ::<span style="color: #000000;">vGets</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:1a24ihy3]
len( oqry) me devuelve mal un valor (creo)
There is no way we can verify and help you. We have a suggestion. If you connect to our FiveWin cloud server [code=fw:2k2nersw]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oCn := FW_DemoDB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:2k2nersw] we have many tables on the server. We have `customer`, `states` and many more tables. If you prepare an independent small program with the tables on this server, we can run the program at our end and provide you support.
lentidao quando usado em XP E WIN98
Tenho uma aplicação Funcioando em FW 16 Bits, que está assim distribuido Servidor winxp Pro 01 Terminal com Winxp Pro 02 Terminais com Win98 Se O problema é que em determinadas Situaçoes o Sistema Fica Lento Demais, quase parando. Demora para gravar, para Abrir, etc... Se For Tudo em WIN 98 Roda Normal ! Porem as máquinas que estão com winXP nao Roda Win98 Desde já Obrigado FW2.6 clipper + CDX + BLINKER
lentidao quando usado em XP E WIN98
No deberías usar Windows 98 con XP en la misma red. Procura usar todos con XP.
lentidao quando usado em XP E WIN98
Já Fiz o Teste, mesmo assim Ficou lento demais ! Coloquei emprestado uma máquina Minha, com Win xp. Mesmo assim Fica Lento Demais ! Me indicaram Usar o FWxH, mas estou apanhando dele ! Por Exemplo a BTNGET, nao funciona o FWxH Desde já Agradeço !
lentidao quando usado em XP E WIN98
El problema no es de Harbour/xharbour ó FWH, el problema es que no se deben usar ordenadores con Windows 98 y Windows XP en la misma red de Windows <!-- m --><a class="postlink" href="http://www.fivewin.com.br/Dicas/459BTNGET.ZIP">http://www.fivewin.com.br/Dicas/459BTNGET.ZIP</a><!-- m -->
lentitud tremenda en red
Hola: Muchas gracias, el server y los equipos son Windows 7. Todo está cableado, tienen el Karperski y hemos excluido los dbfs, cdx y fpt. Estoy loco la verdad.
lentitud tremenda en red
Buenas tardes: Ejecutamos el programa desde una carpeta compartida del servidor, por ejemplo \\servidor\app\app.exe. Cuando sólo lo está ejecutando una estación de trabajo, todo funciona perfecto, pero cuando se conecta un segundo pc, las operaciones del RDDdbfcdx y los xbrowses van lentísimos, es imposible trabajar. ¿Alguna pista por favor?. Muchas gracias.
lentitud tremenda en red
joseluispalma, Usas tablas DBF-NTX?, DBF-CDX?, usas "dbfilter" en las tablas? Tienes ADS instalado Yo tengo DBF-CDX con ADS y funciona como un tiro en RED!! Mi configuración en el PRG principal es: REQUEST DBFCDX RddSetDefault("DBFCDX") REQUEST OrdKeyNo, OrdKeyCount, OrdKeyGoto REQUEST ADS,ADSKEYCOUNT,ADSGETRELKEYPOS,ADSKEYNO,ADSSetRelKeyPos,rddsys RDDREGISTER("ADS",1) SET SERVER LOCAL AdsSetFileType( ADS_CDX ) AdsLocking( .t. ) AdsRightsCheck( .f. ) un saludo LORENZO
lentitud tremenda en red
Hola: No, no usamos ads, sino DBFCDX. Las dbfs son pequeñas, menos de 5.000 registros. La LAN es cableada a 100 Mbps.
lentitud tremenda en red
Virus? usa WI-FI? Saludos.
lentitud tremenda en red
Has probado poniendo el .exe en local? Qué Sistema Operativo usas en el Server?
lentitud tremenda en red
Hola, 1. ¿Tienes la posilibdad de probrar tu app en otra red local? 2. Elimina los CDX y reindexa de nuevo. Podrían ser CDX corruptos. 3. Comprueba que NO activas ningún "set filter to..." en las consultas xbrowses 4. En un PRG principal inserta la siguiente línea: sethandlecount(180) suerte. Un saludo. LORENZO
lentitud tremenda en red
Hola, muchas gracias te comento: 1. ¿Tienes la posilibdad de probrar tu app en otra red local? Sí, y funciona OK. 2. Elimina los CDX y reindexa de nuevo. Podrían ser CDX corruptos. Ya lo hemos hecho. 3. Comprueba que NO activas ningún "set filter to..." en las consultas xbrowses No tenemos filtros. 4. En un PRG principal inserta la siguiente línea: sethandlecount(180) Se supone que sethandlecount(180) sólo es para Clipper, no para Harboour ¿?. Muchas gracias.
lentitud tremenda en red
Ayuda por favor!
lentitud tremenda en red
José Luis, Aunque nunca he tenido ese problema, uso TS, en los foros de fivetech / harbour problemas similares han sido muchas veces vistos. Hay muchos mensajes en ambos foros hablando del tema. Es probable que alguno tenga que ver con tu problema. Quiza Paco Garcia te pueda decir como lo soluciono él [url:1edyyfqs]https&#58;//groups&#46;google&#46;com/forum/#!topic/harbour-users/fUjum_dSEIo[/url:1edyyfqs] salu2
lentitud tremenda en red
Hola, Muchas gracias, sí el problema lo he visto muchas veces reportado, pero nadie comparte la solución. A ver si una alma caritativa me puede echar una mano por favor.
lentitud tremenda en red
A nuestros primos de v.foxpro tambien le pasa, y dan solución: [quote:244xar9t] Un problema puede ser de alguna configuración en el servidor, que se da con archivos compartidos en general (no solo tablas dbf). Vean de hacer lo siguiente: Lo siguiente se tiene que hacer en cada uno de los clientes con W7 afectados Primero desactivé la Compresión Diferencial Remota en: Panel de Control-->Programas y Caraterísticas-->Activar o Desactivar las características de Windows Se abrirá una nueva ventana y localizamos Compresión Diferencial Remota , la desactivamos y Aceptamos. Una vez hecho esto, vamos a modificar el autotiming de la tarjeta de red, que según he leido por ahí, por defecto viene como Normal y había que Desactivarlo, pero a mí, así me fue incluso peor, lo que hice fue ponerlo así desde la consola de comandos: netsh interface tcp set global autotuninglevel=highlyrestricted Reinicé la máquina, sin mucha fe ni esperanza, ya que estaba ya harto de probar historias y ninguna funcionar y... voilà, la cosa empezó a ir rapidita, funcionaba bien el tema, he dejado pasar unos 4-5 días y de momento sigue funcionando todo correcto y ninguna queja, así que me he puesto a escribir esto por si alguien tiene problemas similares espero que le sirva de algo. Fuente: <!-- m --><a class="postlink" href="http://social.technet.microsoft.com/Forums/es-ES/windowsserveres/thread/c90fb04b-957b-4d19-840d-7260ece01204/">http://social.technet.microsoft.com/For ... 0ece01204/</a><!-- m --> Otra cosa a tener en cuenta: <!-- m --><a class="postlink" href="http://support.microsoft.com/kb/915377/es">http://support.microsoft.com/kb/915377/es</a><!-- m --> o sea, el problema no es de fox o de las dbf, el problema es cambio en el funcionamiento del S.O. que hay que configurar apropiadamente para el caso de uso de archivos compartidos. Fijense que el problema no es de ahora, viene de vieja data. [/quote:244xar9t] Desde [url:244xar9t]https&#58;//groups&#46;google&#46;com/forum/#!topic/mundovisualfoxpro/kB_eWOfYnbY[/url:244xar9t]
lentitud tremenda en red
jose luis, Intenta desabilitar el Kaspersky en toda la red y me comentas.
lentitud tremenda en red
Hola ,, Te sugiero revisar los siguientes aspectos.. 1.- Si el "servidor" de archivos/datos tiene suficiente memoria (mínimo 4Gb) y velocidad en el procesador (que con el bus de datos etc.) 2.- EL sistema de comunicación entre el server y las estaciones de trabajo (Grupo de Trabajo, IPs) 3.- Los derechos de los usuarios respecto al acceso al servidor. 4.- Espacio de disco (raro hoy en día, pero por si acaso) 5.- Desecha los antivirus (solo para probar), tuve mala experiencia con Norton, Karspesky, (Microsoft Esentials es liviano) 6.- Revisa el uso de archivo temporales, set filter, reindexados etc. 7.- El Sistema Operativo,,, esta con sus parches al dia?, o es preferible tener uno básico.... Salu2
lentitud tremenda en red
Hola. No se ha solucionado ese problema. Todo apunta a que ha cambiado la forma de tratar los ficheros en las últimas versiones del Sistema Operativo. Hay cosas curiosas en el manejo de las DBFs y los índices. Si hacemos una búsqueda secuencial en un DBF, abriendo como fichero de texto, la primera vez que se busca tarda bastante, luego, las veces posteriores, no tarda nada. Eso es que se W está cacheando el fichero. Supongo que pasa algo parecido con los índices. En definitiva, no he encontrado solución para ello. De las soluciones que estuve mirando, lo más prometedor era LetoDB que se ejecuta como un servidor y que acelera todo el proceso. No lo he probado en extensión. Un saludo
lentitud tremenda en red
Una de las ventajas del uso de hbNetio, según su autor, es que ya no se depende de los protocolos de comunicación del S.O. En el caso de Windows, protocolos atentatorios contra nuestros sistemas dbf based. druzus@... escribió: > It's possible that such direct TCP/IP connection is faster then > file server protocols especially if they need more then one IP frame > to exchange data so it's one of the reason to use it in such cases. > Please make real speed tests. > The second reason to use NETIO server is resolving problem with > concurrent access to the same files using Harbour applications > compiled for different platforms, i.e. DOS, LINUX, Windows and OS2. > It's very hard to configure all client stations to use correct > locking system. NETIO fully resolves this problem so it can be > interesting alternative also for MS-Windows users only if they > do not want to play with oplocks setting on each station. > I'm interesting in user opinions about real life NETIO usage. >
lentitud tremenda en red
hola: hace mucho tiempo, instale en un server 2003, un sistema en DBF, todo bien, hasta que se conectaba el 2° pc al sistema, se me ralentizaba demasiado, revisando el código las instrucciones de bloqueo de archivos para hacer los ingresos, modificaciones o eliminaciones, utilizaba la clausula FLOCK(), "bloqueo de archivo" , las reemplace por las RLOCK(),"bloqueo de registro", saque en todas partes la clausula COMMIT, (aquí era el real problema), y los filtros los reemplace por archivos indexados en partes según el filtro que necesitaba con la clausula "INDEX ON... WHILE ..." ademas ajustando parámetros en los archivos config.sys, FILES=255, BUFFERS=250,4 (no recuerdo bien pero era algo así) también hay que hacer unos ajustes de configuración en el mismo server, para que arranque con los mismos parametros que le colocas a las estaciones de trabajo mira esto es lo que recuerdo, asumo de que el sistema es DBF completo, fue la única forma que logre que funcionara de una forma correcta, (no fue full pero me ayudo mucho) con el tiempo traspase el sistema a MySQL y se acabaron los problemas de velocidad. No se si te sirva pero no esta de mas mencionarlo. Saludos
lentitud tremenda en red
Yo hace mucho que descarté el uso en red, por muchas vueltas que des se convierte en impracticable cuando hay bastantes usuarios. Dos opciones a considerar : Windows Server con licencias de Cliente de Terminal Server o bien, RDPWrapper para el equipo servidor que esté ejecutando Windows 7 ó superior y que los terminales trabajen por escritorio remoto.
lentitud tremenda en red
Hola Busca lo que es el SMB 1.0 y el SMB 2.0, ese es un cambio que hay en Windows 7 y afecta la velocidad de los archivos de red. Saludos Luis
lentitud tremenda en red
[url:12t3aah4]http&#58;//www&#46;alaska-software&#46;com/community/smb2&#46;cxp[/url:12t3aah4]
lentitud tremenda en red
[quote="carlos vargas":fgvd94zp][url:fgvd94zp]http&#58;//www&#46;alaska-software&#46;com/community/smb2&#46;cxp[/url:fgvd94zp][/quote:fgvd94zp] Yo siempre he usado mi programa en un servidor con windows 2008 server RT y nunca he tenido problemas de lentitud y sin necesidad de crearle acceso directo a equis unidad del servidor todo por \\server\empresas.. de seguro algo por ahi anda mal que estes usando filter en lugar de indices cdx Saludos Atte: Adrian C. C.
lentitud xBrowse y ADS
Hola compañeros: Estoy haciendo unas pruebas con ADS, especialmente para acceder a través de Internet. Todo funciona relativamente bién excepto los xBrowses. Los que lo usáis, por favor, ¿me podríais indicar algún tip?. Este es el código que uso: Mil gracias!!. [code=fw:nvvjir7u]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp;<br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #000000;">&#91;</span>...<span style="color: #000000;">&#93;</span><br /><br /><span style="color: #B900B9;">// Sets generales---------------------------------------------------------</span><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1990</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;SET CENTURY <span style="color: #0000ff;">ON</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;SET DATE ITALIAN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;SET DELETED <span style="color: #0000ff;">ON</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;SetCancel<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp;SetDialogEsc<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp;SET<span style="color: #000000;">&#40;</span> _SET_INSERT, .T. <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; <br /><br /><br /><br /><br />&nbsp; &nbsp; Request ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo, AdsGetRelKeyPos, AdsSetRelKeyPos<br /><br />&nbsp; &nbsp; &nbsp;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 />&nbsp; &nbsp; &nbsp;RddSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADS"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//setting up server type</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 1 = Local Server (no client / server)</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 2 = Remote Server</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 3 = Local + Remot</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 4 = Internet Server</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 5 = Local + Internet</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 6 = Remote+Internet</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 7 = Local + Remote + Internet , best choice</span><br />&nbsp; &nbsp; &nbsp;adsSetServerType<span style="color: #000000;">&#40;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// ó &nbsp;adsSetServerType( ADS_REMOTE_SERVER )</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">//setting up the file types</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 1 = DBFNTX</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 2 = DBFCDX</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 3 = ADSADI</span><br />&nbsp; &nbsp; &nbsp;adsSetFileType<span style="color: #000000;">&#40;</span> ADS_CDX <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #B900B9;">// o ADS_CDX</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// -------------------------------------------------------------------------</span><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// Opening DBF FILES</span><br />&nbsp; &nbsp;<span style="color: #000000;">&#91;</span>...<span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">SELECT</span> <span style="color: #000000;">5</span><br />&nbsp; &nbsp;USE <span style="color: #000000;">&#40;</span>cMyPath+<span style="color: #ff0000;">"FACTURAS"</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">INDEX</span> <span style="color: #000000;">&#40;</span>cMyPath+<span style="color: #ff0000;">"FACTURAS"</span><span style="color: #000000;">&#41;</span> &nbsp;SHARED <span style="color: #00C800;">NEW</span> &nbsp;<span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"FACTURAS"</span><br /><br /><br /><br />&nbsp; <span style="color: #B900B9;">// INDEXING</span><br />&nbsp; <span style="color: #000000;">&#91;</span>...<span style="color: #000000;">&#93;</span><br />&nbsp; <br />&nbsp; USE <span style="color: #000000;">&#40;</span>cMyPath+<span style="color: #ff0000;">"FACTURAS"</span><span style="color: #000000;">&#41;</span> &nbsp; EXCLUSIVE <span style="color: #00C800;">NEW</span><br />&nbsp; DELETE ALL <span style="color: #00C800;">FOR</span> EMPTY<span style="color: #000000;">&#40;</span> FIELD->NUMERO <span style="color: #000000;">&#41;</span><br />&nbsp; PACK<br /><br />&nbsp; <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> FIELD->NUMERO &nbsp;<span style="color: #0000ff;">TO</span> <span style="color: #000000;">&#40;</span>cMyPath+<span style="color: #ff0000;">"FACTURAS"</span><span style="color: #000000;">&#41;</span><br />&nbsp; DbCloseAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:nvvjir7u]
lentitud xBrowse y ADS
hola Si pretendes que los browse en internet se comporten como en la red local, imposible... utiliza consultas sql y los datos lo pasas a un arreglo o dbftmp para tener el acceso red local, de lo contrario solo lentitud..
lentitud xBrowse y ADS
Hola, Muchas gracias por contestar. He visto en un post de Mr. Nages que hay que poner el SET DELETED OFF. En este caso sí que hay un ligero aumento de velocidad. Pero entonces, ¿cómo debo construir los índices?. ¿Así?. INDEX ON FIELD->NUMERO TO (cMyPath+"PEDIDOS") FOR !Deleted() Y si los xBrowses van superlentos, ¿cómo usáis ADS en una VPN por ejemplo?. Muchas gracias nuevamente.
lentitud xBrowse y ADS
Lucas si quiere aumento en Ads debes 1. Utilizar tablas ADT que es geniuno de ADS ( ojo las tablas ADT no funciona set delete ya no no aplica para estas tablas ), si borra un registro adios para siempre <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> ) 2.-Utilizar comando SQL 3.- Si utilizas browse,utlizar Arreglos o dbfTmp para que los datos los procese de tu computador y no del servidor ya que ahi en donde se relentiza en buscar los datos por internet.. un ejemplo mas menos asi [code=fw:wf0dc9tc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cSql := <span style="color: #ff0000;">"Select campo1, campo2, campo3 from BASE WHERE campo3 ='FAC'"</span><br />SqlEjecute<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"BaseSQL"</span>, cSql <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">IF</span> <span style="color: #000000;">&#40;</span>nCanreg := BaseSQL-><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;">&#41;</span> > <span style="color: #000000;">0</span><br />   aArray := Array<span style="color: #000000;">&#40;</span> nCanreg,<span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">for</span> i := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nCanReg    <br />       aArray<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := BaseSQL->Campo1<br />       aArray<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := BaseSQL->Campo2<br />       aArray<span style="color: #000000;">&#91;</span>i,<span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := BaseSQL->Campo3<br />   <span style="color: #00C800;">Next</span> i<br />   <span style="color: #B900B9;">//aqui tu browse preferido..</span><br /><span style="color: #00C800;">endif</span><br />BaseSQL-><span style="color: #000000;">&#40;</span> dbCloseArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:wf0dc9tc] [code=fw:wf0dc9tc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//--------------</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ads.ch"</span><br /><span style="color: #00C800;">function</span> SqlEjecute<span style="color: #000000;">&#40;</span> cNewAlias, cSql, hConnection <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">local</span> cAlias := <span style="color: #0000ff;">ALIAS</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, lReturn := .t.<br /><br /><span style="color: #00C800;">DEFAULT</span> hConnection := ViewUsu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">hConnection</span><br /><br /><span style="color: #0000ff;">Select</span> <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">if</span> !AdsCreateSqlStatement<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>cNewAlias<span style="color: #000000;">&#41;</span>, ADS_CDX, hConnection <span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"error AdsCreateSqlStatement()"</span> + CRLF + <span style="color: #ff0000;">"Error:"</span>+cValtochar<span style="color: #000000;">&#40;</span> AdsGetLastError<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 />    lReturn :=  .f.<br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> lReturn .and. !AdsExecuteSqlDirect<span style="color: #000000;">&#40;</span>cSql<span style="color: #000000;">&#41;</span><br />    <span style="color: #000000;">&#40;</span>cNewAlias<span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> dbCloseArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    lReturn :=  .f.<br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"error AdsExecuteSqlDirect(cSql)"</span> + CRLF + <span style="color: #ff0000;">"Error:"</span>+cValtochar<span style="color: #000000;">&#40;</span> AdsGetLastError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + CRLF + cSql <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">if</span> file<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\S</span>qlError.txt"</span> <span style="color: #000000;">&#41;</span><br />        ferase<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\S</span>qlError.txt"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span><br />    Logfile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\s</span>qlError.txt"</span>, <span style="color: #000000;">&#123;</span> cSql <span style="color: #000000;">&#125;</span>  <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">if</span> !empty<span style="color: #000000;">&#40;</span> cAlias <span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">select</span> <span style="color: #000000;">&#40;</span>cAlias<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br />hConnection := <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> lReturn <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------------------</span><br /><br /> </div>[/code:wf0dc9tc] pd. por eso en varios post de SQL hablan de cambiar el chip del los DBF, a mi aún me cuesta <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> jeje
lentitud xBrowse y ADS
Muchas gracias. Sí, al final no voy a tener más remedio. Otra duda, en modo local los índices se crean del tipo .idx pero con AIS y un Diccionario son .cdx. ¿Sabes por qué sucede ésto?. En ambos casos tengo adsSetFileType( ADS_CDX )
lentitud xBrowse y ADS
Yo utilizo siempre diccionario de datos para ambos , local o servidor y te ahorras de colocar la ruta de la tabla [code=fw:3k4tq0kw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />// Opening DBF FILES<br />   [...]<br />   SELECT 5<br />   USE "FACTURAS" INDEX "FACTURAS"  SHARED NEW  ALIAS "FACTURAS"<br />*/</span><br /> </div>[/code:3k4tq0kw] [code=fw:3k4tq0kw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">Init</span> Procedure Inicio<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">local</span> hConnection := <span style="color: #000000;">0</span>, lConecte<br /><br />    SET MULTIPLE <span style="color: #0000ff;">ON</span><br />    SET EPOCH <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1950</span>               <span style="color: #B900B9;">// Admite los años desde el 1990 en adelante</span><br />    SET CONFIRM <span style="color: #0000ff;">ON</span><br />    SET CENTURY <span style="color: #0000ff;">ON</span>                  <span style="color: #B900B9;">// 4 d¡gitos a¤o</span><br />    SET DATE FORMAT <span style="color: #ff0000;">"DD/MM/YYYY"</span>    <span style="color: #B900B9;">// formato dd-mm-yyyy</span><br />    AdsSetDeleted<span style="color: #000000;">&#40;</span> .t. <span style="color: #000000;">&#41;</span><br /><br />    SetHandleCount<span style="color: #000000;">&#40;</span> <span style="color: #000000;">150</span> <span style="color: #000000;">&#41;</span>           <span style="color: #B900B9;">// M ximo n§ ficheros abiertos</span><br />    SET _3DLOOK <span style="color: #0000ff;">ON</span><br />    SET AUTOPEN OFF<br /><br />    oApp := MyApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">Load</span><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 />    <span style="color: #B900B9;">/*<br />    VAR AdsServer       AS NUMERIC     INIT "\\SERVIDOR\SHARED\DICDATO.ADD"<br />    VAR AdsConnect      AS NUMERIC      INIT ADS_REMOTE_SERVER //ADS_LOCAL_SERVER<br />    VAR hConnection      AS NUMERIC     INIT 0<br />     */</span><br /><br />    AdsSetServerType<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">AdsConnect</span> <span style="color: #000000;">&#41;</span><br /><br />    MsgRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Espere un momento, Conectando con el Servidor"</span>, <span style="color: #ff0000;">"Win-Facturación"</span>,;<br />             <span style="color: #000000;">&#123;</span> || lConecte := AdsConnect60<span style="color: #000000;">&#40;</span> oApp:<span style="color: #000000;">AdsServer</span>, oApp:<span style="color: #000000;">AdsConnect</span>, <span style="color: #ff0000;">"adssys"</span>, <span style="color: #ff0000;">"pass"</span>,, @hConnection <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">if</span> !lConecte<br />        <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Hay problemas en el servidor"</span>+CRLF+<span style="color: #ff0000;">"intente mas tarde"</span>, <span style="color: #ff0000;">"usuario"</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Error:"</span>+cValtochar<span style="color: #000000;">&#40;</span> AdsGetLastError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>+CRLF +;<br />            <span style="color: #ff0000;">"Servidor:"</span>+oApp:<span style="color: #000000;">AdsServer</span>, <span style="color: #ff0000;">"Usuario"</span> <span style="color: #000000;">&#41;</span><br />        PostQuitMessage<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />        QUIT<br />        <span style="color: #00C800;">return</span><br />    <span style="color: #00C800;">endif</span><br /><br />    oApp:<span style="color: #000000;">hConnection</span> := hConnection<br />    hConnection := <span style="color: #00C800;">NIL</span><br /><br />    AdsSetFileType<span style="color: #000000;">&#40;</span> ADS_CDX <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 /><br /><span style="color: #00C800;">return</span><br /> </div>[/code:3k4tq0kw]
lentitud xBrowse y ADS
Patricio, Muchas gracias por tu respuesta. El problema de los diccionarios es que tienes que añadir las tablas previamente. Y sobre todo, ¿qué pasa cuando tienes varias empresas?. En todas hay un CLIENTES.DBF. Y lo de la diferencia de índice, idx y cdx, ¿sabes por qué puede ser?. Muchas gracias nuevo. Salu2
lentitud xBrowse y ADS
Que tal Lucas Yo tengo un sistema, trabajando en 2 empresas, una con dd y otra sin. y los 2 utilizan .ADI para los indices. Saludos.
lentitud xBrowse y ADS
Javier, ¿Y cómo haces para especificar el tipo de índice?. Yo con el mismo código, el que he puesto antes, en modo local usa .idx y con DD .cdx. No lo entiendo. Gracias!!!!!!!!!.
lentitud xBrowse y ADS
Lucas asi abro el inicial : [code=fw:1941fqmq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />REQUEST HB_LANG_ES<br />&nbsp; &nbsp;REQUEST DBFCDX, DBFFPT<br />&nbsp; &nbsp; REQUEST ADS,ADSKeyCount,ADSKeyNo,OrdKeyCount,OrdKeyNo,OrdKeyGoto,AdsGetRelKeyPos,AdsSetRelKeyPos<br />&nbsp; &nbsp; 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 />&nbsp; &nbsp; RddSetDefault<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ADS"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; AdsSetServerType<span style="color: #000000;">&#40;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; AdsSetFileType<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; AdsRightsCheck<span style="color: #000000;">&#40;</span> .F. <span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp; <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nNEmpresa = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00C800;">IF</span> AdsConnect60<span style="color: #000000;">&#40;</span> cPathSer, <span style="color: #000000;">7</span>,<span style="color: #ff0000;">"ADSSYS"</span>,<span style="color: #ff0000;">"CORONA"</span>,,@hDD1<span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; MsgRun<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"->Abriendo archivos ... &nbsp;/ Opening files..."</span>,<span style="color: #ff0000;">"Por favor espere / Please Wait"</span>,<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>ABRE_PRIMEROS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,.T.,Cerrar<span style="color: #000000;">&#40;</span><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 />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span> &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgStop<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Se ha rechazado la conexión al servidor de >> ABARROTERA LA CORONA, S.A. DE C.V. << , por favor intente mas tarde"</span>+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span style="color: #ff0000;">"ADS Error"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nNEmpresa = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ADSConnect<span style="color: #000000;">&#40;</span>cPathDAT<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgRun<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Abriendo archivos ... &nbsp;/ Opening files..."</span>,<span style="color: #ff0000;">"Por favor espere / Please Wait"</span>,<span style="color: #000000;">&#123;</span>|| <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>ABRE_PRIMEROS<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,.T.,Cerrar<span style="color: #000000;">&#40;</span><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 />&nbsp; &nbsp; <span style="color: #00C800;">ENDCASE</span><br /><br />&nbsp;</div>[/code:1941fqmq]
lentitud xBrowse y ADS
Ah, pero veo que sólo tienes una empresa. Imagina que tienes tres, luego necesitas 3 diccionarios, uno por cada una. Y ¿cómo creas los índices por favor?. Muchas gracias.
lentitud xBrowse y ADS
ahi tengo 2 empresas, una con dd y otra SIN., Yo creo que por cada empresa ocuparias diferentes dd con sus respectivos paths
lentitud xBrowse y ADS
Yo creo que asi , ya cuando tengas un monton de empresas pues seria de otra forma. [code=fw:301pr3fq]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">CASE</span> nNEmpresa = <span style="color: #000000;">1</span> &nbsp; &nbsp;<span style="color: #B900B9;">// Con DD</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cPathSer := DiskName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">":<span style="color: #000000;">\"</span>+CurDir(DiskName()+"</span>:<span style="color: #ff0000;">")+"</span>\EMPRESA1.ADD<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;IF AdsConnect60( cPathSer, 7,"</span>ADSSYS<span style="color: #ff0000;">","</span>CORONA<span style="color: #ff0000;">",,@hDD1) &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; MsgRun("</span>->Abriendo archivos ... &nbsp;/ Opening files...<span style="color: #ff0000;">","</span>Por favor espere / Please Wait<span style="color: #ff0000;">",{|| IF(ABRE_PRIMEROS(),.T.,Cerrar()) })<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ELSE &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgStop("</span>Se ha rechazado la conexión al servidor de >> EMPRESA <span style="color: #000000;">1</span> << , por favor intente mas tarde<span style="color: #ff0000;">"+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;"</span>ADS Error<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ENDIF<br />&nbsp; &nbsp; &nbsp; &nbsp; CASE nNEmpresa = 2 &nbsp; &nbsp;// SIN DD<br />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;cPathSer := DiskName()+"</span>:\<span style="color: #ff0000;">"+CurDir(DiskName()+"</span>:<span style="color: #ff0000;">")+"</span>\datos\<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ADSConnect(cPathSer)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgRun("</span>Abriendo archivos ... &nbsp;/ Opening files...<span style="color: #ff0000;">","</span>Por favor espere / Please Wait<span style="color: #ff0000;">",{|| IF(ABRE_PRIMEROS(),.T.,Cerrar()) }) <br />&nbsp; &nbsp; &nbsp; &nbsp; CASE nNEmpresa = 3 // Con DD<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cPathSer := DiskName()+"</span>:\<span style="color: #ff0000;">"+CurDir(DiskName()+"</span>:<span style="color: #ff0000;">")+"</span>\EMPRESA3.ADD<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;IF AdsConnect60( cPathSer, 7,"</span>ADSSYS<span style="color: #ff0000;">","</span>CORONA<span style="color: #ff0000;">",,@hDD1) &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; MsgRun("</span>->Abriendo archivos ... &nbsp;/ Opening files...<span style="color: #ff0000;">","</span>Por favor espere / Please Wait<span style="color: #ff0000;">",{|| IF(ABRE_PRIMEROS(),.T.,Cerrar()) })<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ELSE &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgStop("</span>Se ha rechazado la conexión al servidor de >> EMPRESA <span style="color: #000000;">3</span> << , por favor intente mas tarde<span style="color: #ff0000;">"+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;"</span>ADS Error<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ENDIF&nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; CASE nNEmpresa = 4 // Con DD<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cPathSer := DiskName()+"</span>:\<span style="color: #ff0000;">"+CurDir(DiskName()+"</span>:<span style="color: #ff0000;">")+"</span>\EMPRESA4.ADD<span style="color: #ff0000;">"<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;IF AdsConnect60( cPathSer, 7,"</span>ADSSYS<span style="color: #ff0000;">","</span>CORONA<span style="color: #ff0000;">",,@hDD1) &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; MsgRun("</span>->Abriendo archivos ... &nbsp;/ Opening files...<span style="color: #ff0000;">","</span>Por favor espere / Please Wait<span style="color: #ff0000;">",{|| IF(ABRE_PRIMEROS(),.T.,Cerrar()) })<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ELSE &nbsp; &nbsp;&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MsgStop("</span>Se ha rechazado la conexión al servidor de >> EMPRESA <span style="color: #000000;">3</span> << , por favor intente mas tarde<span style="color: #ff0000;">"+CRLF+CRLF+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;"</span>ADS Error<span style="color: #ff0000;">")<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; QUIT<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;ENDIF&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<br />&nbsp; &nbsp; ENDCASE</span></div>[/code:301pr3fq]
lentitud xBrowse y ADS
Lucas; En el foro [url:3d4c68jr]http&#58;//ar&#46;groups&#46;yahoo&#46;com/group/Fivewin-esp/?yguid=312688556[/url:3d4c68jr] en algún momento lei cosultas sobre AIS. Acabo de entrar y en el buscador ingrese: ADS AIS y obtuve varios post como respuesta. Saludos
lentitud xBrowse y ADS
Lucas, Te recomiendo un cambio de enfoque para usar los xbrowser con ADS. Funcionan ? Si claro, pero piensa que contantemente se esta realizando consultas al server y ralentiza mucho el proceso. A mi entender y mi pobre experiencia me dice que lo mejor es atacar un server y que devuelva los registros a procesar. Estos seran tratados a nivel local via array, y cualquier modificacion envias posteriormente al server. De hecho, es muy parecido a como trabajar via SQL. Ahora, si queremos estar constantemente enganchados, notaras esta perdida de rendimiento. Sobre el tema de trabajar con registros set deleted on... Mirate -> <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=9343&hilit=ADS#p85272">viewtopic.php?f=3&t=9343&hilit=ADS#p85272</a><!-- l --> por si te sirve de algo... ya me "pelee" en su dia con Mr. Nagues. jajaja
lentitud xBrowse y ADS
Carles, Muchas gracias por responder. Sí, vi el post tuyo pero no lo acabé de entender. Desde luego, he activado SET DELETED OFF y creo los índices con FOR !Deleted(). Pero de esto último Mr. Nages no dice nada. Tampoco sé al final después de las observaciones de Mr. Nages cómo trabajas realmente, pues él te hizo algunos comentarios. ¿Cómo quedó al final la cosa?. Al final efectivamente tendré que migrar a SQL, pero hay que reeescribir mucho código lamentablemente. ¿Tu usas AIS via Internet?. Un saludo y mil gracias
lentitud xBrowse y ADS
Mario, Muchas gracias, ya miré y no encontré nada. Tampoco en google. A ver si algún gurú me echa por favor un cable. Un saludo,
lentitud xBrowse y ADS
<!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> , bueno la idea es que dejes la consulta; quizás entre los que usan AIS, alguno pueda despejar tus dudas
lgetbar on road
ANY SOLUTION PLEASE !!!!
lgetbar on road
Mr Rao I try the test xbgetbar.prg with My archive dbf When I press set filter button it make error sad there is not the dbf open ...why ? [code=fw:2kcki2ld]<div class="fw" id="{CB}" style="font-family: monospace;">DataBases in use<br />================<br /><br />  <span style="color: #000000;">1</span>:    TDF00001                           RddName: <span style="color: #000000;">DBFCDX</span><br />     ==============================<br />     RecNo    RecCount    BOF   EOF<br />          <span style="color: #000000;">1</span>         <span style="color: #000000;">7959</span>      .F.   .F.<br /><br />     Indexes in use                        TagName<br />           CODICE                             COMCOD<br />        => UPPER<span style="color: #000000;">&#40;</span>LOCALITA<span style="color: #000000;">&#41;</span>                    COMLOC<br />           UPPER<span style="color: #000000;">&#40;</span>PROVINCIA<span style="color: #000000;">&#41;</span>                   COMPRO<br />           CAP                                COMCAP</div>[/code:2kcki2ld] image <!-- m --><a class="postlink" href="https://ibb.co/fYW9Mm8">https://ibb.co/fYW9Mm8</a><!-- m --> [code=fw:2kcki2ld]<div class="fw" id="{CB}" style="font-family: monospace;">  Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">29</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">30</span><span style="color: #000000;">-03</span><span style="color: #000000;">-2019</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">26</span>:<span style="color: #000000;">34</span><br />   Error description: <span style="color: #000000;">Error</span> DBCMD/<span style="color: #000000;">2001</span>  Workarea not in use: <span style="color: #000000;">DBSETFILTER</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => DBSETFILTER<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => SETFILTER<span style="color: #000000;">&#40;</span> <span style="color: #000000;">834</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>SELEZIONECOMUNI<span style="color: #000000;">&#40;</span> <span style="color: #000000;">793</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">697</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">LBUTTONUP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">983</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1791</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BTNBMP</span>.PRG => TBTNBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">2006</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3541</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span></div>[/code:2kcki2ld] probable because I use tdatabase and function SetFilter( oBrw ) is wrong How I can to not use buttons on dialog ? [code=fw:2kcki2ld]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><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;">"Report.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xBrowse.ch"</span><br /><br /><span style="color: #00C800;">static</span> oComuni,oProvince,oStati<br /><span style="color: #00C800;">static</span> cPathDb<br /><br />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 />   *   HB_LangSelect<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"IT"</span><span style="color: #000000;">&#41;</span><br />    *  HB_SetCodePage<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ITWIN"</span><span style="color: #000000;">&#41;</span><br /><br />   SET _3DLOOK <span style="color: #0000ff;">ON</span><br />   SET CENTURY <span style="color: #0000ff;">ON</span><br />   SET DATE ITALIAN<br /><br />   RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br /><br />         cPathDb:=<span style="color: #ff0000;">"DB<span style="color: #000000;">\"</span><br />         oComuni:= TDatabase():Open( , cPathDb+"</span>COMUNI<span style="color: #ff0000;">", "</span>DBFCDX<span style="color: #ff0000;">", .T. )<br />         oComuni:setorder(2)<br />         oComuni:gotop()<br /><br />      SelezioneComuni(oComuni)<br /><br />return nil <br /><br />//-----------------------------------------------------------------------------//<br />Function SelezioneComuni(oComuni)<br />   local oDlg, oBrw, oFont, oBold<br />   local n<br />   DEFINE FONT oFont NAME "</span>TAHOMA<span style="color: #ff0000;">" SIZE 0,-12<br />   DEFINE FONT oBold NAME "</span>TAHOMA<span style="color: #ff0000;">" SIZE 0,-12 BOLD<br /><br />   DEFINE DIALOG oDlg SIZE 800,500 PIXEL TRUEPIXEL ;<br />      FONT oFont TITLE FWVERSION + "</span>Ricerca Comuni<span style="color: #ff0000;">"<br /><br />   @ 110,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;<br />      DATASOURCE oComuni AUTOCOLS CELL LINES NOBORDER<br /><br /><br /><br />   oBrw:aCols[2]:uBarGetVal:= Space(60)<br />   oBrw:aCols[3]:uBarGetVal:= Space(2)<br />   oBrw:nGetBarHeight:=33<br />   oBrw:lGetBar   := .t.<br /><br /><br />     WITH OBJECT oBrw<br />      :nHeaderHeight    := 40 // optional<br />      :oHeaderFonts     := oBold<br />      :bClrEdits        := { || { CLR_BLACK, CLR_YELLOW } }<br />      :AutoFit()<br />      //<br />      :CreateFromCode()<br />   END<br /><br />    @ 10,20 SAY "</span>Gets under Headers. Entered values can be used<span style="color: #ff0000;">" + ;<br />      "</span><span style="color: #00C800;">for</span> filtering or any othe purpose<span style="color: #ff0000;">" + CRLF + ;<br />      "</span>Usage: <span style="color: #000000;">oCol</span>:<span style="color: #000000;">uBarGetVal</span> := Space<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> <span style="color: #000000;">&#41;</span>; oBrw:<span style="color: #000000;">lGetBar</span> := .t.<span style="color: #ff0000;">" ;<br />      SIZE oDlg:nWidth - 40,40 PIXEL OF oDlg CENTER<br /><br />   @ 60, 20 BTNBMP PROMPT { || If( oBrw:lGetBar, "</span>Nascondi<span style="color: #ff0000;">", "</span>Mostra<span style="color: #ff0000;">" ) } ;<br />      SIZE 100,40 PIXEL OF oDlg FLAT ;<br />      ACTION ( oBrw:lGetBar := ! oBrw:lGetBar, oBrw:Refresh() )<br /><br />   @ 60,140 BTNBMP PROMPT "</span>Ricerca<span style="color: #ff0000;">" ;<br />      SIZE 100,40 PIXEL OF oDlg FLAT ;<br />      ACTION ( oBrw:cAlias )->( SetFilter( oBrw ) )<br /><br />   @ 60,250 BTNBMP PROMPT "</span>Pulisci<span style="color: #ff0000;">" ;<br />      SIZE 100,40 PIXEL OF oDlg FLAT ;<br />      ACTION ( oBrw:cAlias )->( DBCLEARFILTER(), oBrw:Refresh(), oBrw:SetFocus() )<br /><br />   ACTIVATE DIALOG oDlg CENTERED<br />   RELEASE FONT oFont, oBold<br /><br />   return nil<br />//-----------------------------------------------------------------------//<br /><br />static function SetFilter( oBrw)<br /><br />   local cFilter := "</span><span style="color: #ff0000;">"<br />   local n, oCol, uVal, cType<br /><br />   for n := 1 to Len( oBrw:aCols )<br />      oCol  := oBrw:aCols[ n ]<br />      if ! Empty( uVal := oCol:uBarGetVal )<br />         if !Empty( cFilter )<br />            cFilter  += "</span> .AND. <span style="color: #ff0000;">"<br />         endif<br />         cType    := ValType( uVal )<br /><br />         do case<br />         case cType == 'C'<br />            uVal     := Upper( AllTrim( uVal ) )<br />            cFilter += '"</span><span style="color: #ff0000;">' + uVal + '</span><span style="color: #ff0000;">" $ UPPER( ' + FieldName( n ) + "</span> <span style="color: #000000;">&#41;</span><span style="color: #ff0000;">"<br />         otherwise<br />            cFilter  += FieldName( n ) + "</span> == <span style="color: #ff0000;">" + cValToChar( uVal )<br />         endcase<br />      endif<br /><br />   next<br /><br />   if Empty( cFilter )<br />      if ! Empty( DBFILTER() )<br />         DBCLEARFILTER()<br />         oBrw:Refresh()<br />      endif<br />   else<br />      if !( DBFILTER() == cFilter )<br />         SET FILTER TO &cFilter<br />         GO TOP<br />         oBrw:Refresh()<br />      endif<br />   endif<br /><br />   oBrw:SetFocus()<br /><br />return nil<br /><br />//----------------------------------------------------------------------------//<br /><br /><br /><br /><br /><br /><br /><br /></span></div>[/code:2kcki2ld]
lgetbar on road
ok I resolved with ...DATASOURCE oComuni:cAlias Now How resolve the search without use buttons on dialog ? I made oBrw:aCols[2]:uBarGetVal:= Space(60) oBrw:aCols[2]:cBarGetBmp:= "search.bmp" oBrw:aCols[2]:bBarGetAction:= { || ( oBrw:cAlias )->( SetFilter( oBrw ) ) } oBrw:aCols[3]:uBarGetVal:= Space(2) oBrw:aCols[3]:cBarGetBmp:= "search.bmp" oBrw:aCols[3]:bBarGetAction:= { || ( oBrw:cAlias )->( SetFilter( oBrw ) ) } but give me error when I press button on get
lgetbar on road
Silvio es asi como se hace lo probe aqui y filtra lo que quieres [code=fw:1zs7xoxc]<div class="fw" id="{CB}" style="font-family: monospace;">   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;">uBarGetVal</span>    := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>    := <span style="color: #ff0000;">"search.bmp"</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;">bBarGetAction</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span>oBrw: <span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> -> <span style="color: #000000;">&#40;</span>SetFilter<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><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;">uBarGetVal</span>    := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>    := <span style="color: #ff0000;">"search.bmp"</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;">bBarGetAction</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span>oBrw: <span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> -> <span style="color: #000000;">&#40;</span>SetFilter<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:1zs7xoxc] Tu parte del código tiene espacio en blanco tal vez sea eso. Reemplaza tu código con este. saludos
lgetbar on road
Marcello , I have also problems I call this function with @ 82, 82 BUTTON oBut1 Prompt ".." SIZE 10, 9 PIXEL OF oFrmFiscale; ACTION SelezioneComuni(@CodLuogoNascita,@cLuogoNascita,@cProvinciaNascita,oGet) [code=fw:1fhqwujh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> SelezioneComuni<span style="color: #000000;">&#40;</span>oComuni,cCodice,cComune,cProvincia,oGet<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> &nbsp;xComune<br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> &nbsp;lRet:=.F.<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nArea &nbsp;:= <span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">IF</span> ! EMPTY<span style="color: #000000;">&#40;</span>cComune<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xComune:=Upper<span style="color: #000000;">&#40;</span>Alltrim<span style="color: #000000;">&#40;</span>cComune<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oComuni:<span style="color: #000000;">seek</span><span style="color: #000000;">&#40;</span>xComune<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> BOLD<br /><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ricerca Comuni"</span> ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">FROM</span> <span style="color: #000000;">452</span>, <span style="color: #000000;">774</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">880</span>, <span style="color: #000000;">1303</span> <span style="color: #0000ff;">PIXEL</span> &nbsp;<span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">14215660</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">32</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-2</span>, <span style="color: #000000;">-2</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE oComuni <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER<br /><br /><br />&nbsp; &nbsp;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;">uBarGetVal</span>:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;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;">cBarGetBmp</span>:= <span style="color: #ff0000;">"find.png"</span><br />&nbsp; &nbsp;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;">bBarGetAction</span>:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;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;">uBarGetVal</span>:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;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;">cBarGetBmp</span>:= <span style="color: #ff0000;">"find.png"</span><br />&nbsp; &nbsp;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;">bBarGetAction</span>:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">nGetBarHeight</span>:=<span style="color: #000000;">20</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">lGetBar</span> &nbsp; := .t.<br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bClrStd</span> &nbsp; := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">193</span>,<span style="color: #000000;">221</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">221</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bLDblClick</span>:=<span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> lRet:=.T.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">bKeyChar</span> := <span style="color: #000000;">&#123;</span> |n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #000000;">13</span>, <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>lRet:=.T.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br />&nbsp; &nbsp; &nbsp;WITH OBJECT oBrw<br />&nbsp; &nbsp; &nbsp; *:<span style="color: #000000;">nHeaderHeight</span> &nbsp; &nbsp;:= <span style="color: #000000;">40</span> <span style="color: #B900B9;">// optional</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">oHeaderFonts</span> &nbsp; &nbsp; := oBold<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bClrEdits</span> &nbsp; &nbsp; &nbsp; &nbsp;:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_YELLOW <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHscroll</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2007</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">l2015</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := .T.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lRecordSelector</span> &nbsp; &nbsp; := .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; &nbsp; &nbsp; &nbsp; := STRETCHCOL_WIDEST<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowRowSizing</span> &nbsp; &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColSwapping</span> &nbsp; := .F.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lAllowColHiding</span> &nbsp; &nbsp; := .F.<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lAllowSizing</span> := .f.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp;oBrw:<span style="color: #000000;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2018</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> &nbsp;<span style="color: #0000ff;">VALID</span> !GETKEYSTATE<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BarSelezione<span style="color: #000000;">&#40;</span>oDlg,oBrw<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span>oComuni:<span style="color: #000000;">localita</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRet:=.F.<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lRet<br /><br />&nbsp; &nbsp; &nbsp; cCodice &nbsp; &nbsp; := oComuni:<span style="color: #000000;">Codice</span><br />&nbsp; &nbsp; &nbsp; cComune &nbsp; &nbsp; := oComuni:<span style="color: #000000;">Localita</span><br />&nbsp; &nbsp; &nbsp; cProvincia &nbsp;:= oComuni:<span style="color: #000000;">Provincia</span><br /><br />&nbsp; &nbsp; &nbsp; oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:1fhqwujh]
lgetbar on road
Now run but I not understood I had to enter oComuni but oComuni is static, probably there is another error somewhere else SEE THIS IMAGE <!-- m --><a class="postlink" href="https://ibb.co/0YxB1g2">https://ibb.co/0YxB1g2</a><!-- m --> [code=fw:2cjoub23]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> SelezioneComuni<span style="color: #000000;">&#40;</span>cCodice,cComune,cProvincia,oGet<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold<br />   <span style="color: #00C800;">local</span> n<br />   <span style="color: #00C800;">Local</span>  xComune<br />   <span style="color: #00C800;">Local</span>  lRet:=.F.<br />   <span style="color: #00C800;">local</span> nArea  := <span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />           <span style="color: #00C800;">IF</span> ! EMPTY<span style="color: #000000;">&#40;</span>cComune<span style="color: #000000;">&#41;</span><br />               xComune:=Upper<span style="color: #000000;">&#40;</span>Alltrim<span style="color: #000000;">&#40;</span>cComune<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />               oComuni:<span style="color: #000000;">seek</span><span style="color: #000000;">&#40;</span>xComune<span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">ENDIF</span><br /><br /><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> BOLD<br /><br /><br />     <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Ricerca Comuni"</span> ;<br />     <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">452</span>, <span style="color: #000000;">774</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">880</span>, <span style="color: #000000;">1303</span> <span style="color: #0000ff;">PIXEL</span>  <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">14215660</span><br /><br />     @ <span style="color: #000000;">32</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-2</span>, <span style="color: #000000;">-2</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg         ;<br />            COLUMNS  <span style="color: #ff0000;">"CODICE"</span>,<span style="color: #ff0000;">"LOCALITA"</span>,<span style="color: #ff0000;">"PROVINCIA"</span>,<span style="color: #ff0000;">"CAP"</span> ;<br />            HEADERS  <span style="color: #ff0000;">"Codice"</span>,<span style="color: #ff0000;">"Località"</span>,<span style="color: #ff0000;">"Provincia"</span>,<span style="color: #ff0000;">"Cap"</span> ;<br />            COLSIZES  <span style="color: #000000;">40</span>,<span style="color: #000000;">120</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">50</span> ;<br />            CELL LINES NOBORDER ;<br />            DATASOURCE oComuni<br /><br /><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;">uBarGetVal</span>:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>:= <span style="color: #ff0000;">"find.png"</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;">bBarGetAction</span>:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><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;">uBarGetVal</span>:= Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>:= <span style="color: #ff0000;">"find.png"</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;">bBarGetAction</span>:= <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br />   oBrw:<span style="color: #000000;">nGetBarHeight</span>:=<span style="color: #000000;">20</span><br />   oBrw:<span style="color: #000000;">lGetBar</span>   := .t.<br />   oBrw:<span style="color: #000000;">bClrStd</span>   := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">KeyNo</span> % <span style="color: #000000;">2</span> == <span style="color: #000000;">0</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">193</span>,<span style="color: #000000;">221</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span>, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">221</span>,<span style="color: #000000;">245</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />   oBrw:<span style="color: #000000;">bLDblClick</span>:=<span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#40;</span> lRet:=.T.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />   oBrw:<span style="color: #000000;">bKeyChar</span> := <span style="color: #000000;">&#123;</span> |n| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> n == <span style="color: #000000;">13</span>, <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>lRet:=.T.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><br />     WITH OBJECT oBrw<br />      *:<span style="color: #000000;">nHeaderHeight</span>    := <span style="color: #000000;">40</span> <span style="color: #B900B9;">// optional</span><br />      :<span style="color: #000000;">oHeaderFonts</span>     := oBold<br />      :<span style="color: #000000;">bClrEdits</span>        := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_YELLOW <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">lHscroll</span>            := .F.<br />      :<span style="color: #000000;">l2007</span>               := .F.<br />      :<span style="color: #000000;">l2015</span>               := .T.<br />      :<span style="color: #000000;">lRecordSelector</span>     := .f.<br />      :<span style="color: #000000;">nStretchCol</span>         := STRETCHCOL_WIDEST<br />      :<span style="color: #000000;">lAllowRowSizing</span>     := .F.<br />      :<span style="color: #000000;">lAllowColSwapping</span>   := .F.<br />      :<span style="color: #000000;">lAllowColHiding</span>     := .F.<br /><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />                    <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#41;</span><br />                      oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span>n<span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lAllowSizing</span> := .f.<br />                   <span style="color: #00C800;">next</span><br /><br />     oBrw:<span style="color: #000000;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">2018</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>  <span style="color: #0000ff;">VALID</span> !GETKEYSTATE<span style="color: #000000;">&#40;</span> VK_ESCAPE <span style="color: #000000;">&#41;</span>;<br />     <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> BarSelezione<span style="color: #000000;">&#40;</span>oDlg,oBrw<span style="color: #000000;">&#41;</span><br /><br />      <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span>oComuni:<span style="color: #000000;">localita</span><span style="color: #000000;">&#41;</span><br />         lRet:=.F.<br />      <span style="color: #00C800;">ENDIF</span><br /><br /><br />   <span style="color: #00C800;">IF</span> lRet<br /><br />      cCodice     := oComuni:<span style="color: #000000;">Codice</span><br />      cComune     := oComuni:<span style="color: #000000;">Localita</span><br />      cProvincia  := oComuni:<span style="color: #000000;">Provincia</span><br /><br />      oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">6</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oGet<span style="color: #000000;">&#91;</span><span style="color: #000000;">7</span><span style="color: #000000;">&#93;</span>:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold<br /><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cFilter := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">local</span> n, oCol, uVal, cType<br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />      oCol  := oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> uVal := oCol:<span style="color: #000000;">uBarGetVal</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />            cFilter  += <span style="color: #ff0000;">" .AND. "</span><br />         <span style="color: #00C800;">endif</span><br />         cType    := ValType<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />         <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">'C'</span><br />            uVal     := Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            cFilter += <span style="color: #ff0000;">'"'</span> + uVal + <span style="color: #ff0000;">'" $ UPPER( '</span> + FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />         <span style="color: #00C800;">otherwise</span><br />            cFilter  += FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" == "</span> + cValToChar<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endcase</span><br />      <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         DBCLEARFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<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 />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> !<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == cFilter <span style="color: #000000;">&#41;</span><br />         SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br />         GO TOP<br />         oBrw:<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 />   <span style="color: #00C800;">endif</span><br /><br />   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> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> BarSelezione<span style="color: #000000;">&#40;</span>oDlg,oBrw<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> oBar<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">64</span>,<span style="color: #000000;">64</span>  <span style="color: #0000ff;">OF</span> oDlg   <span style="color: #000000;">2015</span><br /><br />   oBar:<span style="color: #000000;">bRClicked</span> := <span style="color: #000000;">&#123;</span> || .t. <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br />       FILENAME <span style="color: #ff0000;">"funnel.png"</span>       ;<br />      <span style="color: #0000ff;">Prompt</span> <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lGetBar</span>, <span style="color: #ff0000;">"Nascondi"</span>, <span style="color: #ff0000;">"Mostra"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lGetBar</span> := ! oBrw:<span style="color: #000000;">lGetBar</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar ;<br />       FILENAME <span style="color: #ff0000;">"funnel.png"</span>       ;<br />      <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Pulisci ricerca"</span>     ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DBCLEARFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><br />     <span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><br /><br /><br /><br /><br /> </div>[/code:2cjoub23]
lgetbar on road
En mi caso nunca utilice la clase tDataBase Te adjunto el ejemplo tuyo como lo hice: [code=fw:nfxu323b]<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;">"Report.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"dtpicker.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xBrowse.ch"</span><br /><br /><span style="color: #00C800;">static</span> oComuni,oProvince,oStati<br /><span style="color: #00C800;">static</span> cPathDb<br /><br />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 />   *   HB_LangSelect<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"IT"</span><span style="color: #000000;">&#41;</span><br />    *  HB_SetCodePage<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"ITWIN"</span><span style="color: #000000;">&#41;</span><br /><br />   SET _3DLOOK <span style="color: #0000ff;">ON</span><br />   SET CENTURY <span style="color: #0000ff;">ON</span><br />   SET DATE ITALIAN<br /><br />   RDDSetDefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'DBFCDX'</span> <span style="color: #000000;">&#41;</span><br /><br />   CREODBF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   CREOCDX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*<br />         cPathDb:="DB\"<br />         oComuni:= TDatabase():Open( , "COMUNI", "DBFCDX", .T. )<br />         oComuni:setorder(2)<br />         oComuni:gotop()<br />         */</span><br /><br />use comuni<br />SET ORDER <span style="color: #0000ff;">TO</span> TAG COMLOC IN comuni<br /><br /><br />      SelezioneComuni<span style="color: #000000;">&#40;</span>oComuni<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> SelezioneComuni<span style="color: #000000;">&#40;</span>oComuni<span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oFont, oBold<br />   <span style="color: #00C800;">local</span> n<br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span> BOLD<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">800</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />      <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> FWVERSION + <span style="color: #ff0000;">"Ricerca Comuni"</span><br /><br />   @ <span style="color: #000000;">110</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />            DATASOURCE <span style="color: #ff0000;">"comuni"</span> <span style="color: #0000ff;">AUTOCOLS</span> CELL LINES NOBORDER<br /><br /><br />   oBrw:<span style="color: #000000;">lGetBar</span>   := .t.<br />   oBrw:<span style="color: #000000;">nGetBarHeight</span>:=<span style="color: #000000;">33</span><br /><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;">uBarGetVal</span>    := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">60</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>    := <span style="color: #ff0000;">"search.bmp"</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;">bBarGetAction</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span>oBrw: <span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> -> <span style="color: #000000;">&#40;</span>SetFilter<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><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;">uBarGetVal</span>    := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#41;</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;">cBarGetBmp</span>    := <span style="color: #ff0000;">"search.bmp"</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;">bBarGetAction</span> := <span style="color: #000000;">&#123;</span>|| <span style="color: #000000;">&#40;</span>oBrw: <span style="color: #000000;">cAlias</span><span style="color: #000000;">&#41;</span> -> <span style="color: #000000;">&#40;</span>SetFilter<span style="color: #000000;">&#40;</span>oBrw<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br /><br /><br />     WITH OBJECT oBrw<br />      :<span style="color: #000000;">nHeaderHeight</span>    := <span style="color: #000000;">40</span> <span style="color: #B900B9;">// optional</span><br />      :<span style="color: #000000;">oHeaderFonts</span>     := oBold<br />      :<span style="color: #000000;">bClrEdits</span>        := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, CLR_YELLOW <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />      :<span style="color: #000000;">AutoFit</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #B900B9;">//</span><br />      :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br />    @ <span style="color: #000000;">10</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Gets under Headers. Entered values can be used"</span> + ;<br />      <span style="color: #ff0000;">"for filtering or any othe purpose"</span> + CRLF + ;<br />      <span style="color: #ff0000;">"Usage: oCol:uBarGetVal := Space( 10 ); oBrw:lGetBar := .t."</span> ;<br />      <span style="color: #0000ff;">SIZE</span> oDlg:<span style="color: #000000;">nWidth</span> - <span style="color: #000000;">40</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">CENTER</span><br /><br />   @ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #000000;">&#123;</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lGetBar</span>, <span style="color: #ff0000;">"Ocultar"</span>, <span style="color: #ff0000;">"Mostra"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">lGetBar</span> := ! oBrw:<span style="color: #000000;">lGetBar</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">60</span>,<span style="color: #000000;">140</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Busqueda"</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">60</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">BTNBMP</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Limpiar"</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg FLAT ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">&#41;</span>-><span style="color: #000000;">&#40;</span> DBCLEARFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />   <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oBold<br /><br />   <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//-----------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cFilter := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">local</span> n, oCol, uVal, cType<br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />      oCol  := oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> uVal := oCol:<span style="color: #000000;">uBarGetVal</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />            cFilter  += <span style="color: #ff0000;">" .AND. "</span><br />         <span style="color: #00C800;">endif</span><br />         cType    := ValType<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />         <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">'C'</span><br />            uVal     := Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            cFilter += <span style="color: #ff0000;">'"'</span> + uVal + <span style="color: #ff0000;">'" $ UPPER( '</span> + FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />         <span style="color: #00C800;">otherwise</span><br />            cFilter  += FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" == "</span> + cValToChar<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endcase</span><br />      <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         DBCLEARFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<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 />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> !<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == cFilter <span style="color: #000000;">&#41;</span><br />         SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br />         GO TOP<br />         oBrw:<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 />   <span style="color: #00C800;">endif</span><br /><br />   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> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CREODBF<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         FIELD CODICE, LOCALITA, PROVINCIA, CAP<br /><br />         <span style="color: #00C800;">IF</span> .NOT. FILE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"COMUNI.DBF"</span><span style="color: #000000;">&#41;</span><br />            DbCreate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"COMUNI"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CODICE"</span>   ,<span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                                     <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"LOCALITA"</span> ,<span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                                     <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"PROVINCIA"</span>,<span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">50</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span>,;<br />                                     <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"CAP"</span>      ,<span style="color: #ff0000;">"C"</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CREOCDX<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         FIELD CODICE, LOCALITA, PROVINCIA, CAP<br /><br />         <span style="color: #00C800;">IF</span> .NOT. FILE <span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"COMUNI.CDX"</span><span style="color: #000000;">&#41;</span><br /><br />         USE COMUNI<br /><br />         <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> CODICE    TAG COMCOD <span style="color: #0000ff;">TO</span> COMUNI<br />         <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> LOCALITA  TAG COMLOC <span style="color: #0000ff;">TO</span> COMUNI<br />         <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> PROVINCIA TAG COMPRO <span style="color: #0000ff;">TO</span> COMUNI<br />         <span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> CAP       TAG COMCAP <span style="color: #0000ff;">TO</span> COMUNI<br /><br />         CLOSE ALL<br /><br />         <span style="color: #00C800;">ENDIF</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:nfxu323b]
lgetbar on road
with oldest mode run ok now with tdatabase make error on setfilter func this line if !( DBFILTER() == cFilter ) SET FILTER TO &cFilter
lgetbar on road
Now I changed if Empty( cFilter ) if ! Empty( DBFILTER() ) [b:q419qbeb] oDbf:setfilter()[/b:q419qbeb] * DBCLEARFILTER() oBrw:Refresh() endif else if !( DBFILTER() == cFilter ) * SET FILTER TO &cFilter [b:q419qbeb] oDbf:setfilter(cFilter) oDbf:gotop()[/b:q419qbeb] *GO TOP oBrw:Refresh() endif endif make this error [code=fw:q419qbeb]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br />   Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">C</span>:\Work\Errori\Prg_ tdatabase\New_clienti_tdatabase\Clienti.Exe <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">4</span>,<span style="color: #000000;">264</span>,<span style="color: #000000;">960</span> bytes<br />   Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">&#40;</span>r1703231115<span style="color: #000000;">&#41;</span><br />   FiveWin  version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">18.12</span><br />   C compiler version: <span style="color: #000000;">Borland</span>/Embarcadero C++ <span style="color: #000000;">7.0</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span>-bit<span style="color: #000000;">&#41;</span><br />   Windows version: <span style="color: #000000;">6.2</span>, Build <span style="color: #000000;">9200</span> <br /><br />   Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">17</span> secs <br />   Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">31</span><span style="color: #000000;">-03</span><span style="color: #000000;">-2019</span>, <span style="color: #000000;">21</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">45</span><br />   Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1102</span>  Argument error: <span style="color: #000000;">UPPER</span><br /><br />Stack Calls<br />===========<br />   Called <span style="color: #0000ff;">from</span>:  => UPPER<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>COMPILE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1133</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DBGOTOP<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TDATABASE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">189</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\DATABASE.PRG => TDATABASE:<span style="color: #000000;">GOTOP</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => SETFILTER<span style="color: #000000;">&#40;</span> <span style="color: #000000;">877</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>SELEZIONECOMUNI<span style="color: #000000;">&#40;</span> <span style="color: #000000;">779</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TGET.PRG => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>TGET_CREATEBUTTON<span style="color: #000000;">&#40;</span> <span style="color: #000000;">943</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BUTTON</span>.PRG => TBUTTONBMP:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">179</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TBUTTON:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1755</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\BUTTONB.PRG => TBUTTONBMP:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">261</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3541</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SENDMESSAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => TGET:<span style="color: #000000;">COMMAND</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1125</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => TWINDOW:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TCONTROL:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1801</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\TGET.PRG => TGET:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1151</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3541</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => DIALOGBOXINDIRECT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">DIALOG</span>.PRG => TDIALOG:<span style="color: #0000ff;">ACTIVATE</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">304</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => SELEZIONECOMUNI<span style="color: #000000;">&#40;</span> <span style="color: #000000;">818</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">source</span>\ut\ut_codFisc.prg => <span style="color: #000000;">&#40;</span>b<span style="color: #000000;">&#41;</span>CREA_CODFISCALE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">103</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">BUTTON</span>.PRG => TBUTTON:<span style="color: #0000ff;">CLICK</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">179</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\CONTROL.PRG => TBUTTON:<span style="color: #000000;">HANDLEEVENT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1755</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>: .\source\classes\<span style="color: #0000ff;">WINDOW</span>.PRG => _FWH<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3541</span> <span style="color: #000000;">&#41;</span><br />   Called <span style="color: #0000ff;">from</span>:  => SENDMESSAGE<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span></div>[/code:q419qbeb] [b:q419qbeb]need help of Rao[/b:q419qbeb] oBrw:aCols[2]:uBarGetVal:= Space(60) oBrw:aCols[2]:cBarGetBmp:= "find.png" oBrw:aCols[2]:bBarGetAction:= { || ( oBrw:cAlias )->( SetFilter( oBrw,oComuni ) ) } oBrw:aCols[3]:uBarGetVal:= Space(2) oBrw:aCols[3]:cBarGetBmp:= "find.png" oBrw:aCols[3]:bBarGetAction:= { || ( oBrw:cAlias )->( SetFilter( oBrw,oComuni ) ) } [code=fw:q419qbeb]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> SetFilter<span style="color: #000000;">&#40;</span> oBrw,oDbf<span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> cFilter := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">local</span> n, oCol, uVal, cType<br /><br />   <span style="color: #00C800;">for</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span> <span style="color: #000000;">&#41;</span><br />      oCol  := oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> uVal := oCol:<span style="color: #000000;">uBarGetVal</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />            cFilter  += <span style="color: #ff0000;">" .AND. "</span><br />         <span style="color: #00C800;">endif</span><br />         cType    := ValType<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />         <span style="color: #00C800;">case</span> cType == <span style="color: #ff0000;">'C'</span><br />            uVal     := Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            cFilter += <span style="color: #ff0000;">'"'</span> + uVal + <span style="color: #ff0000;">'" $ UPPER( '</span> + FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" )"</span><br />         <span style="color: #00C800;">otherwise</span><br />            cFilter  += FieldName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" == "</span> + cValToChar<span style="color: #000000;">&#40;</span> uVal <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endcase</span><br />      <span style="color: #00C800;">endif</span><br /><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">&#40;</span> cFilter <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />          oDbf:<span style="color: #000000;">setfilter</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        * DBCLEARFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oBrw:<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 />   <span style="color: #00C800;">else</span><br />      <span style="color: #00C800;">if</span> !<span style="color: #000000;">&#40;</span> DBFILTER<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == cFilter <span style="color: #000000;">&#41;</span><br />       *  SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br />         oDbf:<span style="color: #000000;">setfilter</span><span style="color: #000000;">&#40;</span>cFilter<span style="color: #000000;">&#41;</span><br />         oDbf:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         *GO TOP<br />         oBrw:<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 />   <span style="color: #00C800;">endif</span><br /><br />   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> <span style="color: #00C800;">nil</span><br /> </div>[/code:q419qbeb]
lib de GetNetCardInfo() no la identifica
Saludos, Necesito saber la ip de cada pc en la red, GetNetCardInfo() la incluyo en mi programa y me marca: Compilando REFACCIO.prg... Enlazando refaccio.exe... Error: Unresolved external 'GetAdaptersInfo' referenced from P:\FWH\LIB\FIVEHC.LIB|NETCRDID Error: Unable to perform link 1 Files, 0 Warnings, 2 Errors Tiempo de compilación: 0.64s Tiempo de enlazado: 1.00s Tiempo total: 1.81s tengo que incluir alguna lib en mi proyecto o en que verson de fWH viene?
lib de GetNetCardInfo() no la identifica
[url:248v4pda]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=32517&p=191062&hilit=GetNetCardInfo#p191062[/url:248v4pda]
lib fwh para bcc73
Hola, disculpen el pedido, alguien tiene las librerías de fwh para bcc73. Gracias. Saludos Ruben Dario Fernandez.
lib fwh para bcc73
Ruben, Las librerías de FWH sólo las construye FiveTech y son las que distribuimos con FWH. Las que tienes deben funcionarte sin problemas con BCC 7.3
lib fwh para bcc73
Gracias Antonio. Si funcionan ok. Gracias, saludos Ruben Dario Fernandez
lib\user32.lib
I noticed that now in buildx.bat is also user32.lib included. Could someone please tell me what user32.lib is for? Thank you in advance Otto
lib\user32.lib
There is a new function PrintWindow() of windows API ( user32.dll ) that is used by Ribbonbar. Normally that function should have been included in the lib by Borland. But it was not included. That is the reason FWH provided a user32.lib which includes that function also. This lib is for Borland I think other functions work without this lib as usual
lib\user32.lib
Next FWH 9.08 will not need user32.lib (neither prnwnd.lib) We have managed to dynamically link it: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=84736#p84736">viewtopic.php?p=84736#p84736</a><!-- l -->
lib\user32.lib
Antonio, Very well that you put a link here to your offered solution. Only one problem : I don't understand any word of Spanish. Is it possible to add your solution here too with the English explanation ? Thanks a lot in advance.
libcurl issues
I have successfully used libcurl for some processes, but for a new task, I have uncovered two issues: [b:1do9ip7s]curl_easy_setopt(hCurl, HB_CURLOPT_FOLLOWLOCATION, 1L)[/b:1do9ip7s]. When trying to compile this, Harbour errors at the L ( in 1L ). This is a standard call. [b:1do9ip7s]curl_easy_setopt(hCurl, HB_CURLOPT_DEFAULT_PROTOCOL, "https")[/b:1do9ip7s]. This line errors because the hbcurl.ch does not have a listing for DEFAULT_PROTOCOL These are two standard libcurl settings. My include file is from the latest version of Harbour supplied by FiveTech. Any assistance would be appreciated. I do have the right libraries linked in. I also have curl running smoothly on other tasks. Thank you.
libcurl issues
hi Tim, [quote="TimStone":3uqcbx9u] [b:3uqcbx9u]curl_easy_setopt(hCurl, HB_CURLOPT_DEFAULT_PROTOCOL, "https")[/b:3uqcbx9u].[/quote:3uqcbx9u] there is not HB_CURLOPT_DEFAULT_PROTOCOL but HB_CURLOPT_PROTOCOLS you can use it with HB_CURLPROTO_HTTPS or HB_CURLPROTO_HTTP
libcurl issues
Thank you Sent from my iPhone using Tapatalk
libcurl issues
Sometimes no matter how long you look at something, the answer just doesn't come, even when trying multiple approaches. This is one of them. Still using libcurl: This is a working format in straight c-libcurl: [code=fw:hq3qqzlr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; const char *<span style="color: #00C800;">data</span> = <span style="color: #ff0000;">"{<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp;<span style="color: #000000;">\"</span>transactionData<span style="color: #000000;">\"</span>: {<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp;<span style="color: #000000;">\"</span>transactionType<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>CreditSale<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp;<span style="color: #000000;">\"</span>method<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>hostedFields<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp;<span style="color: #000000;">\"</span>submissionType<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>automatic<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp;<span style="color: #000000;">\"</span>fields<span style="color: #000000;">\"</span>: [<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;{<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">\"</span>id<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>base_amount<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">\"</span>value<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>1.00<span style="color: #000000;">\"</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;},<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;{<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">\"</span>id<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>external_tran_id<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">\"</span>value<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>ae898295-c8b8-4799-b2c1-88e5067be721<span style="color: #000000;">\"</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;},<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;{<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">\"</span>id<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>device_name<span style="color: #000000;">\"</span>,<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">\"</span>value<span style="color: #000000;">\"</span>: <span style="color: #000000;">\"</span>Flex-0554<span style="color: #000000;">\"</span><span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp; &nbsp;}<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp; &nbsp;]<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span> &nbsp;}<span style="color: #000000;">\r</span><span style="color: #000000;">\n</span>}"</span>;<br /><br />&nbsp;</div>[/code:hq3qqzlr] Here is the same code in PHP-CURL: [code=fw:hq3qqzlr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; CURLOPT_POSTFIELDS =><span style="color: #ff0000;">'{<br />&nbsp; "transactionData": {<br />&nbsp; &nbsp; "transactionType": "CreditSale",<br />&nbsp; &nbsp; "method": "hostedFields",<br />&nbsp; &nbsp; "submissionType": "automatic",<br />&nbsp; &nbsp; "fields": [<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; "id": "base_amount",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": "1.00"<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; "id": "external_tran_id",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": ""<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"id": "device_name",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": "Flex-0554"<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; ]<br />&nbsp; }<br />}'</span>,<br /><br />&nbsp;</div>[/code:hq3qqzlr] and in straight cURL: [code=fw:hq3qqzlr]<div class="fw" id="{CB}" style="font-family: monospace;"><br />--data-raw <span style="color: #ff0000;">'{<br />&nbsp; "transactionData": {<br />&nbsp; &nbsp; "transactionType": "CreditSale",<br />&nbsp; &nbsp; "method": "hostedFields",<br />&nbsp; &nbsp; "submissionType": "automatic",<br />&nbsp; &nbsp; "fields": [<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; "id": "base_amount",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": "1.00"<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; "id": "external_tran_id",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": ""<br />&nbsp; &nbsp; &nbsp; },<br />&nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"id": "device_name",<br />&nbsp; &nbsp; &nbsp; &nbsp; "value": "Flex-0554"<br />&nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; ]<br />&nbsp; }<br />}'</span><br /><br />&nbsp;</div>[/code:hq3qqzlr] These are values for cPostFields to pass with curl_easy_setopt(hCurl, HB_CURLOPT_POSTFIELDS, cPostFields). I've viewed a lot of samples, and tried approaches, but I cannot find a "Harbour friendly" format to write this string. Anyone confident on how to approach this ? Thanks.
libcurl issues
Tim, no se si esto es lo que buscas, como generar ese json [code=fw:38xpbpuv]<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: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> aData, aField, aRecord, aFields1 := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, cJson<br />aData   := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />aRecord := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />aRecord<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"transactionType"</span><span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"CreditSale"</span><br />aRecord<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"method"</span><span style="color: #000000;">&#93;</span>          = <span style="color: #ff0000;">"hostedFields"</span><br />aRecord<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"submissionType"</span><span style="color: #000000;">&#93;</span>  = <span style="color: #ff0000;">"automatic"</span><br /><br />aField  := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"id"</span><span style="color: #000000;">&#93;</span>    =  <span style="color: #ff0000;">"base_amount"</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">&#93;</span> =  <span style="color: #ff0000;">"1.00"</span><br />AADD<span style="color: #000000;">&#40;</span>aFields1,aField<span style="color: #000000;">&#41;</span><br />aField  := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"id"</span><span style="color: #000000;">&#93;</span>    =  <span style="color: #ff0000;">"external_tran_id"</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">&#93;</span> =  <span style="color: #ff0000;">""</span><br />AADD<span style="color: #000000;">&#40;</span>aFields1,aField<span style="color: #000000;">&#41;</span><br />aField  := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"id"</span><span style="color: #000000;">&#93;</span>    =  <span style="color: #ff0000;">"device_name"</span><br />aField<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"value"</span><span style="color: #000000;">&#93;</span> =  <span style="color: #ff0000;">"Flex-0554"</span><br />AADD<span style="color: #000000;">&#40;</span>aFields1,aField<span style="color: #000000;">&#41;</span><br />aRecord<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"fields"</span><span style="color: #000000;">&#93;</span> = aFields1<br /><br />aData<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"transactionData"</span><span style="color: #000000;">&#93;</span> = aRecord<br />cJson := hb_jsonEncode<span style="color: #000000;">&#40;</span>aData,.f.<span style="color: #000000;">&#41;</span><br />memowrit<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"json.txt"</span>,cJson<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:38xpbpuv] Mira el archivo json.txt para ver el resultado si es el esperado Espero te sea de utilidad
libcurl issues
I don't know that I have to encode the string as json. I have done that for other external systems where I'm passing data. The examples I have provided were all being sent directly, as shown, to the website using "Postman". They work correctly. However, they are all variants from the Harbour code ( or FWH samples I see ) using libcurl. Any other thoughts ? Yes ... I can test this to see if it works but I think it's really just how I format the data similar to how the examples show, but that Harbour can actually use.
libcurl issues
Try with [code=fw:299tbry0]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> cRequest<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">TEXT</span> INTO cRequest<br /><span style="color: #000000;">&#123;</span><br />&nbsp; <span style="color: #ff0000;">"transactionData"</span>: <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #ff0000;">"transactionType"</span>: <span style="color: #ff0000;">"CreditSale"</span>,<br />&nbsp; &nbsp; <span style="color: #ff0000;">"method"</span>: <span style="color: #ff0000;">"hostedFields"</span>,<br />&nbsp; &nbsp; <span style="color: #ff0000;">"submissionType"</span>: <span style="color: #ff0000;">"automatic"</span>,<br />&nbsp; &nbsp; <span style="color: #ff0000;">"fields"</span>: <span style="color: #000000;">&#91;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"id"</span>: <span style="color: #ff0000;">"base_amount"</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"value"</span>: <span style="color: #ff0000;">"1.00"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span>,<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"id"</span>: <span style="color: #ff0000;">"external_tran_id"</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"value"</span>: <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span>,<br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"id"</span>: <span style="color: #ff0000;">"device_name"</span>,<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"value"</span>: <span style="color: #ff0000;">"Flex-0554"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#93;</span><br />&nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;ENDTEXT<br /><br />&nbsp; &nbsp;? cRequest<br /><br />&nbsp; &nbsp;<br /><br />&nbsp;</div>[/code:299tbry0]
libeay32.dll / ssleay32.dll origin ?
Several years ago I started including libeay32.dll and ssleay32.dll in my applications. This is a library that was provided along with some code for using SSL capabilities in programs, but I can't seem to isolate where / why. The libraries also have .lib files for use in xHarbour / Harbour applications. I'm trying to track back and see what they are used for in current FWH apps so I can see if perhaps they can be eliminated. They are becoming problematic in the build with FWH / Harbour / Microsoft Visual Studio 2013. Any input will be greatly appreciated. Tim
libeay32.dll / ssleay32.dll origin ?
SSLeay was an open source SSL project. It looks like it ceased in 1998 but there was a fork to OpenSSL. Here is the WIkipedia entry [url:u1gwmf2p]http&#58;//en&#46;wikipedia&#46;org/wiki/SSLeay[/url:u1gwmf2p]
libeay32.dll / ssleay32.dll origin ?
Tim, Those libs are related to the SSL use, so you can't remove them. yes, I forgot that we are talking about Microsoft. But we can also create an import lib with it. Basically we have to do this: lib.exe /DEF:libeay32.def /OUT:libeay32.lib I haven't found a way yet (I just checked again Microsoft lib.exe docs right now) to create the DEF file with Microsoft lib.exe. But we can use Borland's impdef.exe to create it and then supply it to Microsoft lib.exe On a next msg I post the contents of libeay32.def. I have searched for libeay32.dll in my Windows 8 64 bits and I get several of them (not sure if they are all the same one) and I have choosen the first one to create the DEF file
libeay32.dll / ssleay32.dll origin ?
I can't post it here (too large). You can download it from here: [url:1y4o20v7]https&#58;//bitbucket&#46;org/fivetech/fivewin-contributions/downloads/libeay32&#46;def[/url:1y4o20v7]
libeay32.dll / ssleay32.dll origin ?
Antonio, There are many versions of libeay32.dll and ssleay32.dll. I actually need a matched set of each: libeay32.dll libeay32.lib ssleay32.dll ssleay32.lib They need to be compatible with Microsoft. They also need to be compatible with hb_tipssl.dll. Unfortunately these libraries are in circulation but not found on the web for download in a current version. I have asked on the Harbour forum if anyone can send them to me. There has been no response. These files are open source so they really can be shared. Why my current ones don't work on the MS Visual Studio build I don't know. I'm still doing comparisons to see what I can find. Tim
libeay32.dll / ssleay32.dll origin ?
Tim, I answered you by email. As I ha ve explained you yesterday I started in a gym and today I can't hardly move my right arm <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> So today I may not be able to type very much...