topic
stringlengths
1
63
text
stringlengths
1
577k
Asesoramiento Para compra de Hard
Hola, vamos a comprar FiveWin para Pocket PC para hacer desarrollos en nuestra empresa, queria saber cual es el mejor equipo para comprar. Muchas Gracias Andres
Asesoramiento Para compra de Hard
El mejor equipo a comprar depende, como siempre del dinero que tienes para hacerlo. Aunque en realidad depende para que lo quieres usar: Para uso diario, como mi PDA personal yo me compraria un HP iPAQ hw6945 Mobile Messenger, cuesta alrededor de 900 usd. Si lo quieres para captura de datos, no hay quien le gane a la serie MC de Symbol, esos pueden estar ente 1,500 a 1,800 usd.
Asesoramiento Para compra de Hard
Andrés, Lo importante es que use Windows Mobile 2003 ó 2005, y que tenga 128 megas de memoria, a ser posible, aunque también funciona con sólo 64. El micro debe ser Intel PXA ó compatible
Asesoramiento Para compra de Hard
Lo mas importante es el sistema operativo y el micro, como te ha comentado Antonio. De los terminales que yo he utilizado, sin duda por su robustez y funcionalidad coincido con Rene, los Symbol (ahora motorola) son de lo mejorcito. Y lo que actualmente sale mejor de precio (en España) es con el programa de puntos de vodafone o orange, ya que puedes conseguir PDA HTC (antes QTEC) a un precio muy economico (29 € en el mejor de los casos, pero siempre mas economicas que el precio de mercado).
Asesoramiento Para compra de Hard
[quote:jyxyn11l]Lo importante es que use Windows Mobile 2003 ó 2005, y que tenga 128 megas de memoria, a ser posible, aunque también funciona con sólo 64. [/quote:jyxyn11l] o que tenga Windows CE, que funciona correctamente. (todos los modelos con los que trabajamos nosotros vienen con Windows CE), con 64 Mb. de memoria. Saludos
Asesoramiento Para compra de Hard
Gracias a todos por los aportes Andres
Asesoria Web Servises
Necesito comunicarme con un programa llamado ecom de la empresa Nestle Alguien tiene alguna idea de como hacerlo Los desarrolladores me pasaron un ejemplo en php [code=fw:1j9sep1n]<div class="fw" id="{CB}" style="font-family: monospace;"><?php<br />require_once<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'lib/nusoap.php'</span><span style="color: #000000;">&#41;</span>;<br />&nbsp;<br />$wsdlurl = &nbsp;<span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php?wsdl"</span>;<br />$client = <span style="color: #00C800;">new</span> nusoap_client<span style="color: #000000;">&#40;</span>$wsdlurl, <span style="color: #ff0000;">'wsdl'</span><span style="color: #000000;">&#41;</span>;<br />&nbsp;<br />$client->soap_defencoding = <span style="color: #ff0000;">'UTF-8'</span>;<br />$client->decode_utf8 = <span style="color: #00C800;">true</span>;<br />&nbsp;<br />$function = <span style="color: #ff0000;">'getMarca'</span>;<br />&nbsp;<br />$cad = <span style="color: #ff0000;">"<login><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <nombreBaseDatos>natsilepru</nombreBaseDatos> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <claveBaseDatos>Ecom2015</claveBaseDatos> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <fechaInicial>2016-01-01</fechaInicial> &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <fechaFinal>2016-01-30</fechaFinal><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <limiteRegistros>10</limiteRegistros> <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <offset>0</offset><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <login>"</span>;<br />&nbsp;<br />$params = array<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'parametros'</span> => $cad<span style="color: #000000;">&#41;</span>;<br />&nbsp;<br />$result = $client->call<span style="color: #000000;">&#40;</span>$function,$params<span style="color: #000000;">&#41;</span>;<br />$err = $client->getError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />&nbsp;<br /><span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>$err != <span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; echo $err;<br /><span style="color: #000000;">&#125;</span><br />&nbsp;<br /><span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>$i=<span style="color: #000000;">0</span>;$i<sizeof<span style="color: #000000;">&#40;</span>$result<span style="color: #000000;">&#41;</span>;$i++<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; $codigomarca=$result<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'codigomarca'</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp; $nombremarca=$result<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">'nombremarca'</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//aquí los insert en la bd</span><br />&nbsp; &nbsp; &nbsp; echo <span style="color: #ff0000;">"Codigo => "</span>.$codigomarca.<span style="color: #ff0000;">" Nombre => "</span>.$nombremarca.<span style="color: #ff0000;">"<br>"</span>;<br /><span style="color: #000000;">&#125;</span><br />&nbsp;<br />&nbsp;<br />?></div>[/code:1j9sep1n] Podria alguien caritativo darme una mano o asesorarme con pago económico claro saludos Wilson
Asesoria Web Servises
Wilson, Aqui tienes un ejemplo de como usar un web service desarrollado por Rafa Carmona con Harbour: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=33&t=31621&p=184517">viewtopic.php?f=33&t=31621&p=184517</a><!-- l -->
Asesoria Web Servises
Master Antonio muchas gracias ya tengo donde mirar saludos cordiales Wilson
Asesoria Web Servises
estimado Antonio, con este codigo parece que ya se conecta pero me regresan los metodos como algo informativo, COMO ? le paso un parametro indicando el metodo que deseo me ejecute por ejemplo el metodo getClientes [code=fw:297hl1ca]<div class="fw" id="{CB}" style="font-family: monospace;">PROCEDURE test_htip<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oHttp, hQuery, cResponse<br /><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cad := <span style="color: #ff0000;">"<login> "</span> + ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<servidorBaseDatos>www.ecom.com.co</servidorBaseDatos>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<nombreBaseDatos>natsilepru</nombreBaseDatos>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<claveBaseDatos>Ecom2015</claveBaseDatos>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<fechaInicial>2016-01-01</fechaInicial>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<fechaFinal>2016-01-30</fechaFinal>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<limiteRegistros>10</limiteRegistros>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<offset>0</offset>"</span>+;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"<login>"</span><br /><br /><br />&nbsp; &nbsp;hQUery := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;hb_HCaseMatch<span style="color: #000000;">&#40;</span> hQuery, .F. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oHttp := TIPClientHTTP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php?wsdl"</span>, .T. <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//hQuery[ "nombre" ] &nbsp; &nbsp;:= "THefull The BEST!"</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//cad = [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">]</span><br /><br />&nbsp; &nbsp;hQuery<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"parametros"</span> <span style="color: #000000;">&#93;</span> &nbsp; &nbsp;:= cad<br />&nbsp; &nbsp;<span style="color: #B900B9;">//hQuery[ "operation name" &nbsp; ] &nbsp; &nbsp;:= 'getClientes'</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ! oHttp:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Error: oHttp:open(): "</span> + oHttp:<span style="color: #000000;">lastErrorMessage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ! oHttp:<span style="color: #000000;">post</span><span style="color: #000000;">&#40;</span> hQuery <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Error: oHttp:post(): "</span> + oHttp:<span style="color: #000000;">lastErrorMessage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;cResponse &nbsp;:= oHttp:<span style="color: #000000;">readAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oHttp:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;hb_memowrit<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'log.log'</span>, cResponse <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Alert<span style="color: #000000;">&#40;</span> cResponse <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span></div>[/code:297hl1ca] Gracias por escucharme saludos Wilson
Asesoria Web Servises
Wilson, Envíale un email a Rafa Carmona que seguro él sabrá ayudarte
Asesoria Web Servises
Buenas Hay muchos ejemplos en este foro que seguro te pondran ayudar. Mi consejo es que si estas muy perdido, uses SOAPCLIENT de M$, ojo que no todos los webservices los soporta, alguno raro me he encontrado. Por ejemplo, [url:lz4bgv70]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=28927&p=179416&hilit=soapclient&sid=e35bc76faa98d0ff1f6cc7c3e4b8f5f5&sid=e35bc76faa98d0ff1f6cc7c3e4b8f5f5#p179416[/url:lz4bgv70] Saludos Cordiales
Asesoria Web Servises
Maestro The Full gracias por la info podrias tu asesorarme? por el momento solo debo leer unos pedidos y traerlos del web services saludos Wilson
Asesoria Web Servises
Una de las herramientas imprescindible de usar para los ws es SoapUI, donde puedes ver por debajo de todo lo que ocurre en la comunicación, lo que te da una idea de lo que va ocurriendo y como tienes que implementar muchas de las llamadas. También puedes mirar si es posible usar la libreria CURL , la cual esta implementada en Harbour. Estoy casi convencido que lo que buscas hacer, alguien en PHP lo ha realizado. O VisualBasic , seguramente te servirá. Si tengo un poco de tiempo, hacer si te monto un ejemplo simple con esa wsd.
Asesoria Web Servises
Gracias Master te lo agradecere mucho cuesta engancharse a estos temas saludos cordiales Wilson
Asesoria Web Servises
Buenas Wilson Te dejo 2 implementaciones , una con SOAPClient, no lo he podido probar porque no me funciona SOAP en mi W7 64 y otro usando peticion directo por http; Vesion SoapClient, no probado. [code=fw:2jz9qhv9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/***************************************************************************/</span><br /><span style="color: #00C800;">function</span> testWilson<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">Local</span> cValue := <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">Local</span> oSoapClient<br />   <span style="color: #00C800;">Local</span> lOk<br />   <span style="color: #00C800;">Local</span> cDominio_WebServices := <span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php?wsdl"</span><br />   <span style="color: #00C800;">Local</span> cad := <span style="color: #000000;">&#91;</span><login> <span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <nombreBaseDatos>natsilepru</nombreBaseDatos><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <claveBaseDatos>Ecom2015</claveBaseDatos><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <fechaInicial><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-01</span></fechaInicial>  <span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <fechaFinal><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-30</span></fechaFinal><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <limiteRegistros><span style="color: #000000;">10</span></limiteRegistros><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  <offset><span style="color: #000000;">0</span></offset><span style="color: #000000;">&#93;</span>+;<br />                <span style="color: #000000;">&#91;</span>  </login> <span style="color: #000000;">&#93;</span> <br /><br />   lOk := .T.<br />   oSoapClient := <span style="color: #00C800;">NIL</span> <br />   <br />   <span style="color: #B900B9;">// Vamos a intentar conectarnos a SOAP30 y si no SOAP</span><br />   <span style="color: #00C800;">try</span><br /><span style="color: #B900B9;">//      oSoapClient  := CreateObject( "MSSOAP.SoapClient30" )  // Conecta a SOAP 3.0</span><br />      oSoapClient  := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSSOAP.SoapConector30"</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// Conecta a SOAP 3.0</span><br />   catch                                                       <span style="color: #B900B9;">// Si falla, conecta a SOAP</span><br />      <span style="color: #00C800;">try</span><br />          oSoapClient  := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSSOAP.SoapClient"</span> <span style="color: #000000;">&#41;</span><br />       catch<br />          cValue := <span style="color: #ff0000;">"No esta disponible SOAPCLIENT"</span><br />          Alert<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br />         lOk := .F.<br />       end<br />   end<br /><br />   <span style="color: #00C800;">if</span> lOk<br />      <span style="color: #00C800;">try</span><br />         alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"msSoapInit"</span><span style="color: #000000;">&#41;</span><br />         oSoapClient:<span style="color: #000000;">msSoapInit</span><span style="color: #000000;">&#40;</span> cDominio_WebServices <span style="color: #000000;">&#41;</span><br />         alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Iniciado"</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">try</span><br />         cValue := oSoapClient:<span style="color: #000000;">GetMarca</span><span style="color: #000000;">&#40;</span> cad <span style="color: #000000;">&#41;</span><br />         catch<br />            cValue := oSOAPClient:<span style="color: #000000;">faultString</span> + Hb_OsNewLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + oSOAPClient:<span style="color: #000000;">detail</span><br />            lOk := .F.<br />         end<br />      catch<br />          cValue := <span style="color: #ff0000;">"Conexion:"</span>+ oSOAPClient:<span style="color: #000000;">faultString</span> + Hb_OsNewLine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + oSOAPClient:<span style="color: #000000;">detail</span><br />          lOk := .F.<br />      end<br />   <span style="color: #00C800;">endif</span><br /><br />   Alert<span style="color: #000000;">&#40;</span> cValue <span style="color: #000000;">&#41;</span><br />   oSoapClient := <span style="color: #00C800;">NIL</span><br />   hb_gcall<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> cValue<br /> </div>[/code:2jz9qhv9] Por POST [code=fw:2jz9qhv9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">FUNCTION</span> testWilson_2<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">Local</span> oHttp<br />    <span style="color: #00C800;">Local</span> cDominio_WebServices := <span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php"</span><br /><br />    <span style="color: #00C800;">Local</span> cXml := <span style="color: #000000;">&#91;</span><?xml version=<span style="color: #ff0000;">"1.0"</span> encoding=<span style="color: #ff0000;">"UTF-8"</span>?> <span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span><soapenv:<span style="color: #000000;">Envelope</span> xmlns:<span style="color: #000000;">xsi</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema-instance"</span> xmlns:<span style="color: #000000;">xsd</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema"</span> xmlns:<span style="color: #000000;">soapenv</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/envelope/"</span> xmlns:<span style="color: #000000;">urn</span>=<span style="color: #ff0000;">"urn:InterfazEc"</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   <soapenv:<span style="color: #000000;">Header</span>/><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   <soapenv:<span style="color: #000000;">Body</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>      <urn:<span style="color: #000000;">getMarca</span> soapenv:<span style="color: #000000;">encodingStyle</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/encoding/"</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>         <parametros xsi:<span style="color: #000000;">type</span>=<span style="color: #ff0000;">"xsd:string"</span>><login><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <nombreBaseDatos>natsilepru</nombreBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <claveBaseDatos>Ecom2015</claveBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <fechaInicial><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-01</span></fechaInicial>  <span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <fechaFinal><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-30</span></fechaFinal><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <limiteRegistros><span style="color: #000000;">10</span></limiteRegistros><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <offset><span style="color: #000000;">0</span></offset><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>            </login></parametros><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>     </urn:<span style="color: #000000;">getMarca</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   </soapenv:<span style="color: #000000;">Body</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span> </soapenv:<span style="color: #000000;">Envelope</span>><span style="color: #000000;">&#93;</span><br /><br /><br />    <span style="color: #00C800;">try</span><br />      oHttp := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.XMLHTTP"</span> <span style="color: #000000;">&#41;</span><br />    catch e<br />         ? <span style="color: #ff0000;">"Error de creacion"</span><br />    end<br /><br />    oHttp:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, cDominio_WebServices, .F. <span style="color: #000000;">&#41;</span><br />    ohttp:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Content-Type"</span> ,<span style="color: #ff0000;">"text/xml;charset=UTF-8"</span> <span style="color: #000000;">&#41;</span><br />    ohttp:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SOAPAction"</span> , <span style="color: #ff0000;">"urn:InterfazEc#getMarca"</span> <span style="color: #000000;">&#41;</span><br />    oHttp:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Connection:"</span>, <span style="color: #ff0000;">"Keep-Alive"</span> <span style="color: #000000;">&#41;</span><br />    oHttp:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-length: "</span>, Str<span style="color: #000000;">&#40;</span> len<span style="color: #000000;">&#40;</span> cXml <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />    hFile := FCreate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"entrada.xml"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">If</span> hFile = <span style="color: #000000;">-1</span><br />       MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se pudo abrir el fichero"</span> +  <span style="color: #ff0000;">"entrada.xml"</span> <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />    <span style="color: #00C800;">endif</span><br />    Fwrite<span style="color: #000000;">&#40;</span> hFile, cXMl  <span style="color: #000000;">&#41;</span><br />    fClose<span style="color: #000000;">&#40;</span> hFile <span style="color: #000000;">&#41;</span><br /><br />    oHttp:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> cXml <span style="color: #000000;">&#41;</span><br /><br />    alert<span style="color: #000000;">&#40;</span> oHttp:<span style="color: #000000;">responseText</span> <span style="color: #000000;">&#41;</span><br />    hFile := FCreate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"salida.xml"</span> <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">If</span> hFile = <span style="color: #000000;">-1</span><br />       MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se pudo abrir el fichero"</span> +  <span style="color: #ff0000;">"salida.xml"</span> <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />    <span style="color: #00C800;">endif</span><br />    Fwrite<span style="color: #000000;">&#40;</span> hFile, oHttp:<span style="color: #000000;">responseText</span>  <span style="color: #000000;">&#41;</span><br />    fClose<span style="color: #000000;">&#40;</span> hFile <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2jz9qhv9] Devuelve lo mismo que SOAPui, por lo tanto, todo correcto Espero que esto te ayude en el camino <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> Saludos Cordiales Saludos Cordiales
Asesoria Web Servises
Rafa muchisimas gracias ya lo voy a probar saludos cordiales Wilson pd: tengo problemas con CHrome y estos foros, ya no me deja ingresar, estoy ingresando por Internet Explorer
Asesoria Web Servises
gracias Rafa <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Asesoria Web Servises
Limpia las cookies del sitio, a mi me paso lo mismo
Asesoria Web Servises
Cristobal muchas gracias eso era saludos Wilson
Asesoria Web Servises
Continuando Probando con el metodo Post ya que el soap me da error me sale [code=fw:3mxmskd7]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <?xml version=<span style="color: #ff0000;">"1.0"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;encoding=<span style="color: #ff0000;">"ISO-8859-1"</span>?><SOAP-ENV:<span style="color: #000000;">Envelope</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xmlns:<span style="color: #000000;">SOAP</span>-ENV=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/envelope/"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:<span style="color: #000000;">xsd</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema"</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:<span style="color: #000000;">xsi</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema-instance"</span><br />&nbsp;xmlns:<span style="color: #000000;">SOAP</span>-ENC=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/encoding/"</span>><SOAP-ENV:<span style="color: #000000;">Body</span>><n<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; s1:<span style="color: #000000;">getMarcaResponse</span> xmlns:<span style="color: #000000;">ns1</span>=<span style="color: #ff0000;">"urn:InterfazEc"</span>><return<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xsi:<span style="color: #000000;">type</span>=<span style="color: #ff0000;">"xsd:string"</span>>servidorBaseDatos Incorrecto<br />&nbsp; &nbsp; &nbsp;</return></ns1:<span style="color: #000000;">getMarcaResponse</span>></SOAP-ENV:<span style="color: #000000;">Body</span>></SOAP-ENV:<span style="color: #000000;">Envelope</span>><br />&nbsp;</div>[/code:3mxmskd7] sin embargo con el programa php y los mismos parametros si me sale bien sigo investigando, y Rafa si pudieras escribir algo generico de coneccion con web services, le pones un precio y creo que saldremos muchos adelante, estos trabajos con complementarios para nuestros sistemas, si logro algo pues lo estare posteando gracias por su ayuda
Asesoria Web Servises
Buenas ¿ Puedes mostrar los datos que te devuelve php ? Si lo datos de login son correctos y dices que funciona, miraré de hacerlo funcionar con soapUI. Pero no entiendo como te puede funcionar el ejemplo que pusistes en PHP, cuando el <login> no está correctamente cerrado.
Asesoria Web Servises
Rafa primero gracias por tu interes aca esta el codigo php que he podido hacer funcionar, con prueba error y ellos los desarrolladores me ayudaron [code=fw:mwt7i8ay]<div class="fw" id="{CB}" style="font-family: monospace;"><?php<br />&nbsp;require_once<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'lib/nusoap.php'</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;$wsdlurl = &nbsp;<span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php?wsdl"</span>;<br />&nbsp;$client = <span style="color: #00C800;">new</span> nusoap_client<span style="color: #000000;">&#40;</span>$wsdlurl, <span style="color: #ff0000;">'wsdl'</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;$fecha_desde = $argv<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>;<br />&nbsp;$fecha_hasta = $argv<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;<br />&nbsp;$nRegistros &nbsp;= $argv<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>;<br /><br /><br />&nbsp;$client->soap_defencoding = <span style="color: #ff0000;">'UTF-8'</span>;<br />&nbsp;$client->decode_utf8 = <span style="color: #00C800;">true</span>;<br /><br />&nbsp;$function = <span style="color: #ff0000;">'getDetallePedido'</span>;<br /><br />&nbsp;$cad = <span style="color: #ff0000;">"<login><br />&nbsp; &nbsp; <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos><br />&nbsp; &nbsp; <nombreBaseDatos>natsilepru</nombreBaseDatos><br />&nbsp; &nbsp; <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos><br />&nbsp; &nbsp; <claveBaseDatos>Ecom2015</claveBaseDatos><br />&nbsp; &nbsp; <fechaInicial>"</span>.$fecha_desde.<span style="color: #ff0000;">"</fechaInicial><br />&nbsp; &nbsp; <fechaFinal>"</span>.$fecha_hasta.<span style="color: #ff0000;">"</fechaFinal><br />&nbsp; &nbsp; <limiteRegistros>"</span>.$nRegistros.<span style="color: #ff0000;">"</limiteRegistros><br />&nbsp; &nbsp; <offset>0</offset><br />&nbsp; &nbsp;<login>"</span>;<br /><br />&nbsp;$params = array<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">'parametros'</span> => $cad<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;$result = $client->call<span style="color: #000000;">&#40;</span>$function,$params<span style="color: #000000;">&#41;</span>;<br />&nbsp;$err = $client->getError<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp;<span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span>$err != <span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; echo $err;<br />&nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp;$array = json_decode<span style="color: #000000;">&#40;</span>$result<span style="color: #000000;">&#41;</span>;<br />&nbsp;$file = fopen<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"his_pedi.txt"</span>,<span style="color: #ff0000;">"w"</span><span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #00C800;">for</span> <span style="color: #000000;">&#40;</span>$i=<span style="color: #000000;">0</span>;$i<count<span style="color: #000000;">&#40;</span>$array<span style="color: #000000;">&#41;</span>;$i++<span style="color: #000000;">&#41;</span><br />&nbsp;<span style="color: #000000;">&#123;</span><br />&nbsp; <span style="color: #B900B9;">//$codigocliente=$array[$i]->codigocliente;</span><br />&nbsp; <span style="color: #B900B9;">//$nombrecliente=$array[$i]->nombrecliente;</span><br /><br />&nbsp; echo $fecha_desde.<span style="color: #ff0000;">"->"</span>.$fecha_hasta.PHP_EOL;<br />&nbsp; fwrite<span style="color: #000000;">&#40;</span>$file, $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->codigopedido.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->codigoproducto.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->cantidad.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->valorunitario.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->tipoproducto.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->porcentajeiva.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $array<span style="color: #000000;">&#91;</span>$i<span style="color: #000000;">&#93;</span>->porcentajedescuento.<span style="color: #ff0000;">";"</span>.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PHP_EOL <span style="color: #000000;">&#41;</span>;<br />&nbsp;<span style="color: #000000;">&#125;</span><br />fclose<span style="color: #000000;">&#40;</span>$file<span style="color: #000000;">&#41;</span>;<br />?></div>[/code:mwt7i8ay] Este programa se lo invoca asi "C:\Program Files\VertrigoServ\Php\php.exe " -- 2015-01-01 2016-31-01 100 los parametros de entrada son las dos fechas y el numero de registro saludos Wilson
Asesoria Web Servises
Me olvide debes instalar la libreria nusoap bajandola desde sorceforge saludos Wilson
Asesoria Web Servises
perdon la linea de comandos es "C:\Program Files\VertrigoServ\Php\php.exe " -f prueba.php -- 2015-01-01 2016-31-01 100 saludos Wilson
Asesoria Web Servises
Buenos dias Sorry , pero si con soapUI no funciona, no puedo ver exactamente que ocurre.. Te pego la llamada que se hace desde soapUI, a ver si puedes comentarles DONDE esta error. Según las especificaciones , que monta automaticamente sopaUI. [code=fw:3i44go0j]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><soapenv:<span style="color: #000000;">Envelope</span> xmlns:<span style="color: #000000;">xsi</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema-instance"</span> xmlns:<span style="color: #000000;">xsd</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema"</span> xmlns:<span style="color: #000000;">soapenv</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/envelope/"</span> xmlns:<span style="color: #000000;">urn</span>=<span style="color: #ff0000;">"urn:InterfazEc"</span>><br />&nbsp; &nbsp;<soapenv:<span style="color: #000000;">Header</span>/><br />&nbsp; &nbsp;<soapenv:<span style="color: #000000;">Body</span>><br />&nbsp; &nbsp; &nbsp; <urn:<span style="color: #000000;">getDetallePedido</span> soapenv:<span style="color: #000000;">encodingStyle</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/encoding/"</span>><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<parametros xsi:<span style="color: #000000;">type</span>=<span style="color: #ff0000;">"xsd:string"</span>><login><br />&nbsp; &nbsp; <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos><br />&nbsp; &nbsp; <nombreBaseDatos>natsilepru</nombreBaseDatos><br />&nbsp; &nbsp; <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos><br />&nbsp; &nbsp; <claveBaseDatos>Ecom2015</claveBaseDatos><br />&nbsp; &nbsp; <fechaInicial><span style="color: #000000;">2015</span><span style="color: #000000;">-01</span><span style="color: #000000;">-01</span></fechaInicial><br />&nbsp; &nbsp; <fechaFinal><span style="color: #000000;">2016</span><span style="color: #000000;">-31</span><span style="color: #000000;">-01</span></fechaFinal><br />&nbsp; &nbsp; <limiteRegistros><span style="color: #000000;">10</span></limiteRegistros><br />&nbsp; &nbsp; <offset><span style="color: #000000;">0</span></offset><br />&nbsp; &nbsp;</login></parametros><br />&nbsp; &nbsp; &nbsp; </urn:<span style="color: #000000;">getDetallePedido</span>><br />&nbsp; &nbsp;</soapenv:<span style="color: #000000;">Body</span>><br /></soapenv:<span style="color: #000000;">Envelope</span>><br />&nbsp;</div>[/code:3i44go0j]
Asesoria Web Servises
Buenas Esto no soluciona la cuestión anterior, ver exactamente que es lo que envia PHP, pero esta solución, otra más, lo que hace es no depender de terceros, haciendo portable el codigo a otras plataformas, GNU/Linux, Android, etc.. usando simplemente las clases que nos provee Harbour. [code=fw:29v4kfts]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#require <span style="color: #ff0000;">"hbtip"</span><br />Funtion SendSoap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />    <span style="color: #00C800;">LOCAL</span> oHttp, cResponse := <span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">Local</span> cXml := <span style="color: #000000;">&#91;</span><?xml version=<span style="color: #ff0000;">"1.0"</span> encoding=<span style="color: #ff0000;">"UTF-8"</span>?> <span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span><soapenv:<span style="color: #000000;">Envelope</span> xmlns:<span style="color: #000000;">xsi</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema-instance"</span> xmlns:<span style="color: #000000;">xsd</span>=<span style="color: #ff0000;">"http://www.w3.org/2001/XMLSchema"</span> xmlns:<span style="color: #000000;">soapenv</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/envelope/"</span> xmlns:<span style="color: #000000;">urn</span>=<span style="color: #ff0000;">"urn:InterfazEc"</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   <soapenv:<span style="color: #000000;">Header</span>/><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   <soapenv:<span style="color: #000000;">Body</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>      <urn:<span style="color: #000000;">getMarca</span> soapenv:<span style="color: #000000;">encodingStyle</span>=<span style="color: #ff0000;">"http://schemas.xmlsoap.org/soap/encoding/"</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>         <parametros xsi:<span style="color: #000000;">type</span>=<span style="color: #ff0000;">"xsd:string"</span>><login><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <servidorBaseDatos>www.ecom.com.co</servidorBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <nombreBaseDatos>natsilepru</nombreBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <usuarioBaseDatos>pedidos@natsilepru</usuarioBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <claveBaseDatos>Ecom2015</claveBaseDatos><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <fechaInicial><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-01</span></fechaInicial>  <span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <fechaFinal><span style="color: #000000;">2016</span><span style="color: #000000;">-01</span><span style="color: #000000;">-30</span></fechaFinal><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <limiteRegistros><span style="color: #000000;">10</span></limiteRegistros><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>                  <offset><span style="color: #000000;">0</span></offset><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>            </login></parametros><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>     </urn:<span style="color: #000000;">getMarca</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span>   </soapenv:<span style="color: #000000;">Body</span>><span style="color: #000000;">&#93;</span>+;<br />    <span style="color: #000000;">&#91;</span> </soapenv:<span style="color: #000000;">Envelope</span>><span style="color: #000000;">&#93;</span><br /><br />    oHttp := TIPClientHTTP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://69.20.52.167/eforce/wsInterfacesEc/InterfacesEc3.php"</span> <span style="color: #000000;">&#41;</span><br />    oHttp:<span style="color: #000000;">nConnTimeout</span> := <span style="color: #000000;">20000</span><br /><br />    <span style="color: #B900B9;">/* Connect to the HTTP server */</span><br />    <span style="color: #00C800;">IF</span> ! oHttp:<span style="color: #000000;">open</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br />       Alert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Connection error:"</span>, oHttp:<span style="color: #000000;">lastErrorMessage</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />       <span style="color: #00C800;">RETURN</span> <span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">ENDIF</span><br /><br />    oHttp:<span style="color: #000000;">hFields</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"Content-Type"</span><span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">"text/xml;charset=UTF-8"</span><br />    oHttp:<span style="color: #000000;">hFields</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"Connection:"</span><span style="color: #000000;">&#93;</span>   := <span style="color: #ff0000;">"Keep-Alive"</span><br />    oHttp:<span style="color: #000000;">hFields</span><span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"SOAPAction:"</span><span style="color: #000000;">&#93;</span>   := <span style="color: #ff0000;">"urn:InterfazEc#getMarca"</span><br /><br />    <span style="color: #00C800;">if</span> oHttp:<span style="color: #000000;">post</span><span style="color: #000000;">&#40;</span> cXML <span style="color: #000000;">&#41;</span><br />      cResponse   := oHttp:<span style="color: #000000;">readAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span>  <br /><br />    oHttp:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> cResponse<br /> </div>[/code:29v4kfts]
Asesoria Web Servises
Rafa muchas gracias por tus esfuerzos Pues ami solo me ha funcionado con php nunca he trabajado con php solo he armado algo simple que llama desde lineas de comandos y genera un .txt que leeré desde harbour con eso por el momento me es suficiente, me preocupa en adelante cuando tenga yo que grabar en el WS saludos y gracias Wilson pd: He probado el ejemplo y siempre me devuelve el error servidorBaseDatos Incorrecto
Asi se hace en php como lo hago en fw SOLUCIONADO
Amigos, sigo insistendo porque no me sale. esto funciona en php.............quisiera hacer lo mismo desde fw $resulta1 = mysqli_query($conexion, " SELECT * FROM $tabla_db2 WHERE subcta = $cue "); $consulta1 = mysqli_fetch_array($resulta1); $claveve = $consulta1['clave']; $nombre = $consulta1['subnom']; $cuentaoriginal = $consulta1['cta']; $tipomoneda = $consulta1['sumon']; un simple select con where. Gracias.
Asi se hace en php como lo hago en fw SOLUCIONADO
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=39684&p=236659#p236659">viewtopic.php?f=3&t=39684&p=236659#p236659</a><!-- l -->
Asignacion de alias para SQL sobre ADS
Hola señores: Tengo una pequeña inquietud con respecto al manejo de los alias en fwh con motor de ADS. Al inicio de un aplicacion, estoy abriendo un numero x de tablas sueltas .ADT y les estoy asignando sus respectivos alias..(los abro al iniciar, y nunca los cierro sino hasta que el usuario salga de dicha aplicacion). He estado viendo algunos ejemplos sobre el uso de las consultas SQL y para ello primero toca crearles una conexion previa..por ejemplo yo usaria estas instrucciones: 1. RUTABUS:="D:\mistablas\" 2. s:=ADSCONNECT(RUTABUS) 3: h:=ADSCREATESQLSTATEMENT("sqlalias",3) 4. ADSEXECUTESQLDIRECT(cSQL) ... sqlalias->(DBCLOSEAREA()) ADSDISCONNECT(ADSGETCONNECTIONHANDLE()) Esto me implica tener que estar utilizando la instruccion (2.) cada vez que deseo hacer una consulta. Sabiendo que, (como dije anteriormente) yo ya tengo unos alias previamente abiertos al inicio de la aplicacion, es posible realizar las consultas sobre esos alias ? Como seria el procedimiento ? Gracias de antemano..
Asignacion de alias para SQL sobre ADS
Hola, el RDDADS no es lo mismo que el SQL de ADS, cuando tu te conectas ya sea a un diccionario o a un directorio de tablas sueltas la unica manera de interactuar con las tablas de la conexion es a traves de sentencias SQL, en este caso nada tienen que hacer los alias que tienes asignados con los (DBF, ADT) abiertos por medio del RDD. Ahora si lo que quieres es solo conectarte una sola vez, lo que puedes hacer es eliminar el cursor creado por el SELECT luego de ser utilizado sqlalias -> ( DBCLOSEAREA() ), y vuelves a realizar la consulta sin necesidad de conectarte nuevamente. espero sea lo que necesitabas saludos Marcelo
Asignación dinamica de accion en botones
Buenos días: Tengo que crear un dialogo con una serie de botones, el número de los mismos es diferente de unas ocasiones a otra, y los tengo creados desde recursos, esos tiene una unica acción, que es la de cargar una variable con el valor que representa el prompt del botón, y ponerla a su vez en un say. Pues esta es la que no acabo de conseguir [code=fw:3091yf73]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">for</span> i=<span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> ultimo<br />        <span style="color: #0000ff;">redefine</span> <span style="color: #0000ff;">BUTTON</span> aboton<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">id</span> <span style="color: #000000;">1100</span>+i <span style="color: #0000ff;">of</span> odlg <span style="color: #0000ff;">prompt</span> str<span style="color: #000000;">&#40;</span>i,<span style="color: #000000;">3</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#123;</span>cres:=<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cCaption</span><span style="color: #000000;">&#41;</span>,ores:<span style="color: #000000;">settext</span><span style="color: #000000;">&#40;</span>cres<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />              <br /><span style="color: #00C800;">next</span> i<br /> </div>[/code:3091yf73] Así es como lo hago, evidentemente no es la forma, pues me genera un error en tiempo de ejecución al no existir la variable self Alguna idea, he buscado por el foro y no encuentro nada, pero me pareció ver hace tiempo algo similar Un saludo y gracias
Asignación dinamica de accion en botones
Un primer error es que la creacion de los botones no la haces en un metodo de la clase que contiene la data cCaption. O metes la creacion en un metodo de la clase o pasas el objeto como parametro y luego lo utilizas asi objPar:cCaption.
Asignación dinamica de accion en botones
Hmpaquito, gracias. Supongo que si aplico tu solución, acabo con el mismo valor siempre, pues el valor que devolvería cualquier actio de cualquier boton sería aboton[i]:ccaption, i si el último valor que tomó i era 76, pues en todos los botones devolverá 76. Lo que tengo que hacerlo he visto alguna vez en este foro, pero no lo encuentroes que el baction de cada boton sea diferente aunque generado de forma secuencial usando el mismo patron y ahi es donde no doy con la forma. Muchas gracias José Luis
Asignación dinamica de accion en botones
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=188264&sid=94a6500a7a0b79664c9f4ed6906f653e#p188264">viewtopic.php?p=188264&sid=94a6500a7a0b79664c9f4ed6906f653e#p188264</a><!-- l -->
Asignación dinamica de accion en botones
Antonio: Muchas gracias, eso buscaba, pero cual es mi sorpresa que si pongo en el action del redefine del button esto cres:=str(::nid-1100,3,0) me tira un error en ejecución diciendo que no existe la variable self. Gracias. Un saludo
Asignar bPrint de Tpreview
Quiero personalizar el dialogo del Preview para dejarlo con el mismo look que el resto del programa . La opción correcta es usar el nuevo codeblock que se ha creado para tal efecto como ClassData bPrint . Pero : ¿ como es la forma mas correcta de asignarlo ? , ¿ Añadiendo código a La función Rpreview() ? . ¿ que otras soluciones mas elegantes aconsejais ? . Gracias por vuestras respuestas .
Asignar bPrint de Tpreview
Purpose of bPrint is to enable you have your own dialog. You need to write a function which replaces Method PrintPage(), in your style. Within the function, you can use all methods and data of TPreview. bPrint := { |oRep| MyPrintPage( oRep ) } function MyPrintPage( Self ) <here write your function as if you are replacing method PrintPage() > return nil
Asignar bPrint de Tpreview
[quote="nageswaragunupudi":3po0cmwh]Purpose of bPrint is to enable you have your own dialog. You need to write a function which replaces Method PrintPage(), in your style. Within the function, you can use all methods and data of TPreview. bPrint := { |oRep| MyPrintPage( oRep ) } function MyPrintPage( Self ) <here write your function as if you are replacing method PrintPage() > return nil[/quote:3po0cmwh] Right, but the question is where is the right place to assign the codeblock ? In the RPreview modified function ?
Asignar bPrint de Tpreview
If you want the replacement globally for the entire application, then the best place is in the beginning of the program in function main(). RPreview():bPrint := <block> If you want only for a single report, anytime before activating the report: RPreview():bPrint := <block> After printing the report RPreview():bPrint := nil
Asignar bPrint de Tpreview
[quote="nageswaragunupudi":1mjbus58]If you want the replacement globally for the entire application, then the best place is in the beginning of the program in function main(). RPreview():bPrint := <block> l[/quote:1mjbus58] Exactly this was looking. Thank you very much for the help
Asignar campos a LISTBOX
Seguro es de cajón, pero no encuentro una manera práctica de asiganar los campos de una Base de datos a un LISTBOX, tengo el sigueinte código por ejemplo: [code=fw:2z8mncwd]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrwBusCli;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FIELDS Cli->Cli_Cod, Cli->Cli_Nom, Cli->Cli_Tel, Cli->Cli_Te2, Cli->Cli_Dir, Cli->Cli_Pob;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1000</span> <span style="color: #0000ff;">OF</span> oDlgBusCli <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Cli"</span><br />&nbsp;</div>[/code:2z8mncwd] y busco poder hacer algo como esto: [code=fw:2z8mncwd]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrwBusCli;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FIELDS aFldDb; <span style="color: #B900B9;">//Array, queda el crear una expresión en una variable por ejemplo &cFldDb</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1000</span> <span style="color: #0000ff;">OF</span> oDlgBusCli <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Cli"</span><br />&nbsp;</div>[/code:2z8mncwd] He echado un ojo a la clase Listbox.prg, pero no encuentro una manera práctica de hacerlo. Seguramente sea algo fácil o trivial, pero no he encontrado nada similar por el foro. Gracias y Saludos!
Asignar campos a LISTBOX
Triumvirato De esa forma no lo podras hacer, el comando crea un codeblock (no un array ) con los "fields" a mostrar intentalo de esta forma: [code=fw:30kjy5vo]<div class="fw" id="{CB}" style="font-family: monospace;">aFldDb = <span style="color: #000000;">&#123;</span> Cli->Cli_Cod, Cli->Cli_Nom, Cli->Cli_Tel, Cli->Cli_Te2, Cli->Cli_Dir, Cli->Cli_Pob <span style="color: #000000;">&#125;</span></div>[/code:30kjy5vo] [code=fw:30kjy5vo]<div class="fw" id="{CB}" style="font-family: monospace;">  <br />  <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrwBusCli;<br />            FIELDS <span style="color: #00C800;">NIL</span>; <span style="color: #B900B9;">//Array, queda el crear una expresión en una variable por ejemplo &cFldDb</span><br />            <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1000</span> <span style="color: #0000ff;">OF</span> oDlgBusCli <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Cli"</span><br />  <br />  oBrwBusCli:<span style="color: #000000;">bLine</span> = <span style="color: #000000;">&#123;</span>|| aFldDb <span style="color: #000000;">&#125;</span><br /> </div>[/code:30kjy5vo] o de esta otra forma [code=fw:30kjy5vo]<div class="fw" id="{CB}" style="font-family: monospace;">oBrwBusCli = TWBrowse<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #0000ff;">Redefine</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1000</span>, <span style="color: #000000;">&#123;</span>|| aFldDb <span style="color: #000000;">&#125;</span>, oDlgBusCli,,,,,,,,,,,,,,,<span style="color: #ff0000;">"Cli"</span> <span style="color: #000000;">&#41;</span></div>[/code:30kjy5vo]
Asignar campos a LISTBOX
Te faltan asignar tamaños de columna: [code=fw:wxybbfrj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrwBusCli;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FIELDS Cli->Cli_Cod, Cli->Cli_Nom, Cli->Cli_Tel, Cli->Cli_Te2, Cli->Cli_Dir, Cli->Cli_Pob;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"Campo1"</span>, <span style="color: #ff0000;">"Campo2"</span>, <span style="color: #ff0000;">"Campo3"</span>, &nbsp;<span style="color: #ff0000;">"Campo4"</span>, <span style="color: #ff0000;">"Campo5"</span>, <span style="color: #ff0000;">"Campo6"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SIZES <span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span>,<span style="color: #000000;">80</span> ; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1000</span> <span style="color: #0000ff;">OF</span> oDlgBusCli <br /><br />&nbsp;</div>[/code:wxybbfrj]
Asignar campos a LISTBOX
Daniel, Al hacerlo de cualquiera de los dos modos que propones, el Browse toma un registro de la base de datos aleatorio y lo repite en todos los registros del Browse... Muchas gracias por tu ayuda. Willi, Cierto, me faltaban esas definiciones en mi código, pero en este caso las omití a propósito para simplificar al máximo posible mi ejemplo, siempre procuro hacerlo para que las respuestas de quien me ayuda puedan ser más concisas y sobre todo, no haceros perder mucho el tiempo leyendo mi código a aquellos que como tú me ayudáis. De ahí que intente siempre simplificar al máximo. Por cierto, tu hijo ya va a hacer dos años? como crecen estos "enanos", parece que fué ayer, verdad?. Muchísimas gracias por tu apunte, Willi. Saludos!
Asignar campos a LISTBOX
Daniel, Al final lo he resuelto así, a falta de criterio solución mejor: [code=fw:34c3a9nf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aFldBrw := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"Cli_Cod"</span>, <span style="color: #ff0000;">"Cli_Nom"</span>, <span style="color: #ff0000;">"Cli_Tel"</span>, <span style="color: #ff0000;">"Cli_Te2"</span>, <span style="color: #ff0000;">"Cli_Dir"</span>, <span style="color: #ff0000;">"Cli_Pob"</span> <span style="color: #000000;">&#125;</span><br />cAlias := <span style="color: #ff0000;">"Cli"</span><br /><br />......<br /><br /><br />cFldBrw := <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> nVarFor = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aFldBrw <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp;cFldBrw += cAlias + <span style="color: #ff0000;">"->"</span> + aFldBrw<span style="color: #000000;">&#91;</span> nVarFor <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">", "</span><br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp;cFldBrw := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cFldBrw, <span style="color: #000000;">1</span>, Len<span style="color: #000000;">&#40;</span> cFldBrw <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">LISTBOX</span> oBrwBusCli;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FIELDS &cFldBrw;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1000</span> <span style="color: #0000ff;">OF</span> oDlgBusCli <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Cli"</span><br />&nbsp; <br />&nbsp;</div>[/code:34c3a9nf] Saludos.
Asignar objeto a xBrowse
Tengo una aplicación que genera un informe diario con la posibilidad de visualizar informes de fechas anteriores. Para esto genero un archivo, lo escribo en disco y lo levanto con la clase TTxtFile. El objeto generado con esa clase lo muestro en un xBrowse del siguiente modo: [code=fw:34rpkvtz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xBrowse</span> oBrw <span style="color: #0000ff;">Of</span> oDlg Columns <span style="color: #ff0000;">"cLine"</span> Object oTxt <span style="color: #0000ff;">Font</span> oFont <span style="color: #B900B9;">// oTxt objeto TTxtFile</span><br /><br /> </div>[/code:34rpkvtz] Hasta aquí funciona perfectamente, pero cuando cambio la fecha de consulta, genero nuevamente el objeto oTxt, el xBrowse me presenta una sola linea ( la 1º ) y el documento tiene 134. Lo que no encuentro es como refrescar el xBrowse con el nuevo objeto oTxt. Si alguien sabe ?. Desde ya muchas gracias. Saludos
Asignar objeto a xBrowse
Estoy urgenciado por resolver este problema, sino tendré que deshechar este control. Si alguien sabe agradecería. Saludos
Asignar objeto a xBrowse
Hola Horacio. Deberías mostrar más código, para ver cómo lo estás haciendo. Con MySql, lo hago así: [code=fw:1euq4p34]<div class="fw" id="{CB}" style="font-family: monospace;"> oTbTemp:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">//destruyo el objeto anterior</span><br />&nbsp;oTbTemp := oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"SELECT * FROM mitabla ORDER BY fecha ;"</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">//creo de nuevo el objeto</span><br />&nbsp;oBrw:<span style="color: #000000;">SetMySql</span><span style="color: #000000;">&#40;</span>oTbTemp,.f.<span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">//lo cargo al browse</span><br />&nbsp;oTbTemp:<span style="color: #000000;">Gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oTbTemp:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;oBrw:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp;<span style="color: #B900B9;">//refresco el browse</span><br />&nbsp;</div>[/code:1euq4p34] Espero te pueda servir de guía. Saludos.
Asignar objeto a xBrowse
Francisco, gracias por responder. He probado tu sugerencia y tampoco funciona. Hago lo mismo que tu, destruyo el objeto y lo vuelvo a generar, lo que no sé es como volverle a asignar al browse el nuevo objeto para que lo muestre. Así como para un objeto recordset lo muestro con oBrw : SetAdo( oRs), para mostrar un objeto oTxt generado por la clase TTxtFile, cual es el método ??? Espero haberme explicado. Nuevamente gracias por tu ayuda. Saludos
Asignar objeto a xBrowse
Horacio XBrowse no soporta de forma nativa ese objeto, pero igual verifica que existan metodos de navegacion(gotop, gobottom, skip, etc), posiblemente lo este usando como un objeto "Browseable" porias intentar usar el metodo "SetoDbf( oTxt )", talvez funcione (no lo he probado)
Asignar objeto a xBrowse
Gracias Daniel por responder. Lo que no entiendo es que si puedo mostrar el archivo de texto con la siguiente instrucción y lo muestra perfectamente [code=fw:3m7829ni]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">xBrowse</span> oBrw <span style="color: #0000ff;">Of</span> oDlg Columns <span style="color: #ff0000;">"cLine"</span> Object oTxt <span style="color: #0000ff;">Font</span> oFont<br /> </div>[/code:3m7829ni] Se supone entonces que este control si soporta un objeto creado por la clase TTxtfile ( oTxt ). Puedo navegar perfectamente por el texto. Lo que no he encontrado es la manera de actualizar este texto. He probado con SetToDbf( oTxt ) pero lo único que me muestra es la primera linea del texto, sin embargo si imprimo el browse el archivo se imprime entero, lo mismo si lo exporto a Excel. La verdad me tiene desconcertado. Si miro el archivo .ppo he visto que la llamada a este comando es la siguiente función: [code=fw:3m7829ni]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw := XbrowseNew<span style="color: #000000;">&#40;</span> oDlg, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>,,,,,,,,, oFont,,,,, .F., oTxt,, .F.,, .F.,, .F., .F. ,, <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"cLine"</span><span style="color: #000000;">&#125;</span>,,, .F., .F., .F., .F.,,,,, .F., .F. <span style="color: #000000;">&#41;</span><br /> </div>[/code:3m7829ni] He mirado la clase para ver esta función pero no he descubierto la manera de actualizar el objeto. Llevo una semana con este problema, anteriormente utilicé la clase mget para mostrar el archivo pero me encontré también con errores ( ver enlace ) <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25030">viewtopic.php?f=6&t=25030</a><!-- l --> No puedo creer que no pueda mostrar y actualizar un simple archivo de texto. Con la versión 7.12 podía hacerlo perfectamente pero desde que me actualicé a FWH 12.04 no encuentro la manera. Saludos
Asignar tecla
Hay alguna manera que en el estilo de edición EDIT_GET_LISTBOX de una tabla xBrowse le pueda asignar una tecla para que se despliegue la lista ( en un combobox con F3 despliego la lista ) o solo lo puedo hacer con el ratón ?. Gracias de antemano Saludos
Asignar teclas a un get ( Solucionado )
Colegas, necesito asignarle ciertas teclas a un control get pero al hacerlo se deshabilitan las teclas por defecto ( las flechas, retroceso, etc. ). Alguna pista para que esto no suceda ? Muchisimas gracias
Asignar teclas a un get ( Solucionado )
Muestra como estás haciendo via código. Saludos.
Asignar teclas a un get ( Solucionado )
Gracias por responder, aquí el código [code=fw:v9cpgf2t]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">bKeyDown</span> &nbsp;:= <span style="color: #000000;">&#123;</span> | nKey | ::<span style="color: #000000;">KeyGet4</span><span style="color: #000000;">&#40;</span> nKey, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> &nbsp;<br />&nbsp;</div>[/code:v9cpgf2t] Saludos
Asignar teclas a un get ( Solucionado )
Que hace ? [code=fw:1y5nzurc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">Function</span> KeyGet4 &nbsp;?? ahi algo en ella que causa este efecto ó no?<br />&nbsp;</div>[/code:1y5nzurc]
Asignar teclas a un get ( Solucionado )
No creo, esto funciona en FWH 14.12 no así en FWH 17.01. Posteo el código [code=fw:3qdgnb1y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Method</span> KeyGet4<span style="color: #000000;">&#40;</span> nKey, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">Class</span> TCobro <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />    <span style="color: #00C800;">Switch</span> nKey<br />        <span style="color: #00C800;">Case</span> VK_RETURN<br />            <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTCobrarBk</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> == <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nContado</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />                ::<span style="color: #000000;">RealizaPago</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            <span style="color: #00C800;">Else</span><br />                ::<span style="color: #000000;">MenuContado</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />            End<br />            Exit<br />        <span style="color: #00C800;">Case</span> VK_F9<br />            AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aFacturas</span>, <span style="color: #000000;">&#123;</span> | x | x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBrw1</span> : <span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">nContado</span> := <span style="color: #000000;">0</span><br />            ::<span style="color: #000000;">nTotal</span>   := <span style="color: #000000;">0</span><br />            oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</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;">4</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">cFooter</span> := Transform<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">'@E 99,999,999.99'</span> <span style="color: #000000;">&#41;</span><br />            ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />            Exit<br />    EndSwitch                   <br />    <span style="color: #00C800;">Return</span> <span style="color: #000000;">0</span><br /><br /> </div>[/code:3qdgnb1y] Saludos
Asignar teclas a un get ( Solucionado )
Intentas asi: [code=fw:1lyfn9t8]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Method</span> KeyGet4<span style="color: #000000;">&#40;</span> nKey, oDlg <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">Class</span> TCobro <br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />&nbsp; &nbsp; <span style="color: #00C800;">Switch</span> nKey<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> VK_RETURN<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTCobrarBk</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> == <span style="color: #0000ff;">Round</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nContado</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">RealizaPago</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">MenuContado</span><span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Case</span> VK_F9<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AEval<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aFacturas</span>, <span style="color: #000000;">&#123;</span> | x | x<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw1</span> : <span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nContado</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nTotal</span> &nbsp; := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</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; &nbsp; &nbsp; &nbsp; oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">cFooter</span> := Transform<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">nTotal</span>, <span style="color: #ff0000;">'@E 99,999,999.99'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oBrw1</span> : <span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit<br />&nbsp; &nbsp; EndSwitch<br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> nKey <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// &nbsp; &nbsp;Return 0</span><br />&nbsp;</div>[/code:1lyfn9t8]
Asignar teclas a un get ( Solucionado )
Gracias Karinha, funcionó perfectamente. Saludos
Asignar teclas a un tree
Cuando utilizo oTree : bKeyDown las teclas por defecto del tree dejan de funcionar. Como puedo hacer para asignar acciones desde el teclado sin que pierda funcionalidad ???. Muchas gracias Saludos
Asignar teclas a un tree
Prueba a devolver nil desde el codeblock que asignes a bKeyDown
Asignar teclas a un tree
Gracias Antonio, funcionó perfectamente. Saludos
Asignar valor a bprint en preview
Hola a todos. Usando tprinter para crear unos informes, me encuentro con la necesidad de modificar la acción y el menú de imprimir en el preview, he visto que se pude declarar en la CLASSDATA bprint de la clase Tpreview, sinembargo no se como asignarle valor, desde un objeto Tprinter. Agradecería una manita, si es que es posible hacerlo. Un saludo y mi agradecimiento
Asignar valor a una funcion
Muy buenas foro, tengo una duda sobre funciones, es decir, como podría asignar un valor a una funcion, me explico, tengo este codigo: method Var(cCampo) class CDIt local nPos nPos:=ascan( ::acTipos, {|v| lower(v[1]) = lower(cCampo) } ) if nPos<>0 ::acTipos[nPos,2] // Me da el valor de esa variable end if return y me gustaría llamar a esa funcion como si de una variable se tratase, es decir, como algo así: o:Var("numeroserie"):="999" Entonces la variable numeroserie que está en un array de la clase CDIt pueda modificarla de esta forma, o como sea, es decir, enfocarme como podría hacerlo, gracias. Un Saludo.
Asignar valor a una funcion
[code:17mmf5on] method Var&#40;cCampo, cValor &#41; class CDIt local nPos &#58;= AScan&#40; &#58;&#58;acTipos, &#123;|v| lower&#40;v&#91;1&#93;&#41; = lower&#40;cCampo&#41; &#125; &#41; if nPos<>0 if PCount&#40;&#41; > 1 &#58;&#58;acTipos&#91;nPos,2&#93; = cValor else return &#58;&#58;acTipos&#91; nPos, 2 &#93; endif else &#46;&#46;&#46; end if return [/code:17mmf5on] o:Var("numeroserie", "999" )
Asignar valores x puntero de variable
Buenos días foro. Se puede hacer esto?. El objetivo es pasar variables en forma de array a una función, y que los cambios en el array se reflejen en las variables. Ya Probé Proceso({@a,@b,@c}) y no funciona. Se agradece cualquier ayuda a:="Primero" b:="Segundo" c:="Tercero Proceso({a,b,c}) ? a,b,c, // first, second, third Function Proceso (ar) ar[1]:="First" ar[2]:="Second" ar[3]:="Third" Return NIL
Asignar valores x puntero de variable
Hola, Function( @aData ) C.
Asignar valores x puntero de variable
[quote="Carles":7jelb9gc]Hola, Function( @aData ) C.[/quote:7jelb9gc] Gracias Carles, pero funciona cuando quiero pasar un array como parámetro; a lo que me refiero es que el origen se trate de variables independientes como "cCodigo", "cNombre" ó "dFecha"; hablo de pasarlos en la forma de array {cCodigo,cNombre,dFecha} para poder pasar una cantidad variable e ilimitada de parámetros, de modo que dentro de la función los cambios en los elementos del array sean cambios en cada una de las variables independientes. Crees que se puede? Gracias nuevamente
Asignar valores x puntero de variable
Has pensado en probar a usar un hash?
Asignar valores x puntero de variable
Una idea [code=fw:1znmiswk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Local</span> hLinea := hash<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />hLinea<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"iditem"</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">0</span><br />hLinea<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"descripcion"</span><span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">"la descripción"</span><br />hLinea<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"valor"</span><span style="color: #000000;">&#93;</span> := <span style="color: #000000;">150000</span><br />hLinea<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"estado"</span><span style="color: #000000;">&#93;</span> := <span style="color: #ff0000;">"N"</span><br />pasoa<span style="color: #000000;">&#40;</span>hLinea<span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1znmiswk]
Asignarle teclas a un control Get
Necesitaria asignarle una tecla a un control Get con el método bKeyDown(), pero al hacerlo pierde las fucionalidades de las teclas de cursor. Hay alguna manera de asignarle una tecla a un get y que no pierda las funcionalidades de las demás o tengo que hacerlo desde el código de la clase ???. Muchas gracias.
Asignarle teclas a un control Get
hola, oMiGet:bGotFocus:= { !nkey,nFlag| if(nKey==VK_tuTecla, mifuncion(),) } Salu2.
Asignarle teclas a un control Get
Ariel, gracias por responder pero tu código me da error, Este es el log [code=fw:1nopn8zk]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Aplicación<br />===========<br />&nbsp; &nbsp;Path y nombre: <span style="color: #000000;">C</span>:\colegio_b\T-REX.EXE <span style="color: #000000;">&#40;</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;Tamaño: <span style="color: #000000;">4</span>,<span style="color: #000000;">264</span>,<span style="color: #000000;">960</span> bytes<br />&nbsp; Versión del compilador: <span style="color: #000000;">xHarbour</span> build <span style="color: #000000;">1.2</span><span style="color: #000000;">.1</span> Intl. <span style="color: #000000;">&#40;</span>SimpLex<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>Rev. <span style="color: #000000;">9421</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; Versión librería GUI: <span style="color: #000000;">FWHX</span> <span style="color: #000000;">12.04</span><br />&nbsp; &nbsp;versión de Windows: <span style="color: #000000;">5.1</span>, Build <span style="color: #000000;">2600</span> Service Pack <span style="color: #000000;">2</span><br /><br />&nbsp; Tiempo de ejecución: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">28</span> secs <br />&nbsp; &nbsp;Error occurrido el: <span style="color: #000000;">05</span>/<span style="color: #000000;">06</span>/<span style="color: #000000;">2012</span>, <span style="color: #000000;">08</span>:<span style="color: #000000;">18</span>:<span style="color: #000000;">10</span><br />&nbsp;Descripci¢n del error: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">1070</span> &nbsp;Error de argumento: ==<br />&nbsp; &nbsp;Args:<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> = O &nbsp; TGET<br />&nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#91;</span> &nbsp; <span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> = N &nbsp; <span style="color: #000000;">120</span><br /><br />&nbsp;</div>[/code:1nopn8zk]
Asignarle teclas a un control Get
Muestra: mifuncion() Porfa. Sds
Asignarle teclas a un control Get
Karinha, aqui el código de mifuncion() [code=fw:362zvji0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> MiFuncion<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <br />&nbsp; &nbsp;oBrwCheques : <span style="color: #000000;">Enable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrwCheques : <span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;AddRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">nContado</span> := <span style="color: #000000;">0</span> <br />&nbsp; &nbsp;oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</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;oGet<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> : <span style="color: #000000;">Disable</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oBrwCheques : <span style="color: #000000;">aArrayData</span><span style="color: #000000;">&#91;</span> Len<span style="color: #000000;">&#40;</span> oBrwCheques : <span style="color: #000000;">aArrayData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> := nTotalSeleccionado<br />&nbsp; &nbsp;oBrwCheques : <span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Return</span> <span style="color: #000000;">0</span><br />&nbsp;</div>[/code:362zvji0]
Asignarle teclas a un control Get
Intente: oMiGet:bGotFocus :={ || IF( nKey == VK_RETURN, MiFuncion( oMiGet ) ) } ó oMiGet:bGotFocus :={ || IF( nKey == VK_RETURN, MiFuncion( oMiGet ), ) } Sds
Asignarle teclas a un control Get
Karinha, he probado tu sugerencia pero me dá error, Dice que la variable nKey no existe. ¿ Seguro que se puede asignar una tecla con el método bGotFocus ??? Me parece que este método no tiene como parámetros nKey. La verdad que este problema no me permite seguir avanzando, con la versión FWH 7.12 esto no sucedia. Muchas gracias por responder.
Asignarle teclas a un control Get
prueba asi REDEFINE Get aGets[1] VAR vale1 Id 101 Of oDlg PICTURE "@K99999999" UPDATE aGets[1]:bKeyDown:={|nKey|If(nkey== VK_RETURN,Buscar_Vale(oBrw1,aDatos,aCheques,TotVal,oDlg,@vale1,aGets,forpago,tipodocto), ) } STATIC FUNC Buscar_Vale(oBrw,aDatos,aCheques,TotVal,oDlg,vale1,aGets,forpago,tipodocto) *------------------------------------------------------------------------------------ Return(.T.) saludos
Asignarle teclas a un control Get
Muchisimas gracias jbrita, funcionó perfectamente. Saludos
Ask help to convert a php function into harbour
Hi! This is for eascape Illegal chars in sql , for I use mysql_real_eascape() in libmysql.dll not cuccess. function escape($str) { $search=array("\\","\0","\n","\r","\x1a","'",'"'); $replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"'); return str_replace($search,$replace,$str); } Or : mysql.c add HB_FUNC( SQLEASCAPE ) { mysql_real_escape_string( (MYSQL *)_parnl(1), _parc(2), _parc(3), _parnl(4) ) ; hb_retc( _parc(2)) ; } in prg ?SQLEASCAPE(oserver:nsocket,,"Zak's") Want to be: "Zak\'s " Regards ! Shuming Wang
Asociacion de ficheros
Buenas a todos Me he creado una aplicación para mi trabajo que gestiona una serie de ficheos propios a los que les he puesto estencion XJ2. El programa los abre y trabaja con las distntas líneas del fichero, entre otras cosas. Mi intención es asociar esa extención con mi programa. Hasta ahí, todo bien, mi pregunta es: Cuando haga doble click sobre un fichero XJ2 se abrirá mi programa, pero ¿como sabe el programa que se ha habierto porque se ha pulsado sobre un fichero XJ2? y ¿cómo sabe el programa el nombre del fichero que lo llamó? Me imagino que habrá que pasarle el nombre del fichero al programa y que éste lo recogerá a través de la función Main(), pero ¿cómo?. ¿Alguién ha hecho alguna vez algo así? Gracias de antemano.
Asociacion de ficheros
Efectivamente, cuando se asocian los ficheros a mi programa este recibe el nombre del fichero que lo llamó vía FUNTION MAIN(cFileName) y cFileName trae el nombre del fichero con el path completo. Pero ahora tengo un problema. Cuando pincho sobre un fichero XJ2 se abre mi programa desde el directorio del fichero XJ2, no desde el suyo propio, y CurDir() me devuelve el directorio del fichero XJ2, no el del programa. Y eso es un problema pues necesito saber en que directorio corre mi programa antes de abrir bases de datos y otros ficheros de datos. ¿Hay alguna maner de saberlo de sin recurrir a CurDir()? Gracias
Asociacion de ficheros
[u:i0g3n98n]Una aclaración[/u:i0g3n98n]: Creando un INI en el directorio del sistema de Windows no habría problema, pero necesito hacerlo sin tener que tocar nada en ese directorio de sistema, pues algunos ordenadores no me lo permiten (falta de derechos de acceso para algunos usuarios).
Asociacion de ficheros
[quote="antolin":5fk202e9]Efectivamente, cuando se asocian los ficheros a mi programa este recibe el nombre del fichero que lo llamó vía FUNTION MAIN(cFileName) y cFileName trae el nombre del fichero con el path completo. Pero ahora tengo un problema. Cuando pincho sobre un fichero XJ2 se abre mi programa desde el directorio del fichero XJ2, no desde el suyo propio, y CurDir() me devuelve el directorio del fichero XJ2, no el del programa. Y eso es un problema pues necesito saber en que directorio corre mi programa antes de abrir bases de datos y otros ficheros de datos. ¿Hay alguna maner de saberlo de sin recurrir a CurDir()? Gracias[/quote:5fk202e9] Arg( 0 ) es el path completo de tu EXE; si al arrancar tu programa capturas este valor, podrás abrir los archivos que quieres en su carpeta. Por ejemplo: cPathExe := cFilePath( Arg(0) ) cPathDatos := cFilePath( Arg(0) ) + "\misdatos" Y así haces lo que quieres. Nota: Ahora no sé si la function cFilePath() es de FiveWin o mía.
Asociacion de ficheros
Gracias FiveWidi, Funciona perfectamente. Nunca había utilizado esas funciones aunque recuerdo haber leido algo de eso hace muuuuchos años. Todos los días se aprende algo nuevo.
Asociacion de ficheros
Por cierto FiveWidi, cFilePath() es d FiveWin. Además, ocurre algo curioso, si abro mi programa normalmente, Arg(0) me devuelve el nombre [b:1492kw6u]largo[/b:1492kw6u] completo, con su path y todo. Sin embargo cuando se habre pinchando sobre el otro fichero, me devuelve lo mismo pero con nombre [b:1492kw6u]corto[/b:1492kw6u]. Menos mal que está SFN2LFN() para ponerle remedio.
Asociacion de ficheros
[quote="antolin":3r5y8sg8]Por cierto FiveWidi, cFilePath() es d FiveWin. Además, ocurre algo curioso, si abro mi programa normalmente, Arg(0) me devuelve el nombre [b:3r5y8sg8]largo[/b:3r5y8sg8] completo, con su path y todo. Sin embargo cuando se habre pinchando sobre el otro fichero, me devuelve lo mismo pero con nombre [b:3r5y8sg8]corto[/b:3r5y8sg8]. Menos mal que está SFN2LFN() para ponerle remedio.[/quote:3r5y8sg8] Gracias, no lo sabía. Como bien has dicho: "Todos los días se aprende algo nuevo." -> Yo también. Buen fin de semana.
Asociar BtnBmp a una tecla de funcion
Hola amigos del foro: Se puede asociar un [b:1mq9n6kg]BtnBmp[/b:1mq9n6kg] a una tecla de funcion, sin usar la funcion [b:1mq9n6kg]SetKey()[/b:1mq9n6kg]. Dicho de otro modo, que al presiona la tecla [b:1mq9n6kg]F3[/b:1mq9n6kg] se ejecute el [b:1mq9n6kg]bAction[/b:1mq9n6kg] de un [b:1mq9n6kg]BtnBmp[/b:1mq9n6kg]. El problema del SetKey() es que si abro un dialogo encima del que tiene el [b:1mq9n6kg]BtnBmp y los setkey()[/b:1mq9n6kg] asignados, los setkey() tb son validos para el nuevo dialogo. De antemano, gracias por la ayuda. Atentamente, Rolando Cochabamba, Bolivia
Asociar BtnBmp a una tecla de funcion
Rolando Prueba asi : [code=fw:34ik1k35]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aKeys    := <span style="color: #000000;">&#123;</span> VK_F2, VK_F3 <span style="color: #000000;">&#125;</span> <br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4002</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; <span style="color: #0000ff;">CENTER</span>;<br />&nbsp; &nbsp; <span style="color: #0000ff;">PROMPT</span> aOptions<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>;<br />&nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont1;<br />&nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lExit:= .T., lValYes:= .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>;<br />&nbsp; &nbsp; GRADIENT <span style="color: #000000;">&#123;</span>|lInvert| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lInvert, aClrGradInvert<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, aClrGradGreen<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 /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4003</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span>;<br />    <span style="color: #0000ff;">CENTER</span>;<br />    <span style="color: #0000ff;">PROMPT</span> aOptions<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>;<br />    <span style="color: #0000ff;">FONT</span> oFont1;<br />    <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> lExit:= .T., lValYes:= .F., 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>;<br />    GRADIENT <span style="color: #000000;">&#123;</span>|lInvert| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> lInvert, aClrGradInvert<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, aClrGradRed<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 /><br />  oDlg:<span style="color: #000000;">bKeyDown</span> = <span style="color: #000000;">&#123;</span>|nKey| KeyDown<span style="color: #000000;">&#40;</span> nKey, aKeys, oBtn <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg;<br />    <span style="color: #0000ff;">CENTERED</span>;<br />    <span style="color: #0000ff;">VALID</span> lExit<br /><br />......<br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">Function</span> KeyDown<span style="color: #000000;">&#40;</span> nKey, aKeys, oBtn <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span> <br />    <span style="color: #00C800;">case</span> nKey == aKeys<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>; Eval<span style="color: #000000;">&#40;</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bAction</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">case</span> nKey == aKeys<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>; Eval<span style="color: #000000;">&#40;</span> oBtn<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">bAction</span> <span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">endcase</span><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:34ik1k35]
Asociar BtnBmp a una tecla de funcion
Exactamente como dice albeiroval: (Probado) [code=fw:16lm5en7]<div class="fw" id="{CB}" style="font-family: monospace;">oDlg:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">&#123;</span>|nKey| <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>nKey == VK_F3, Eval<span style="color: #000000;">&#40;</span>oBtn:<span style="color: #000000;">bAction</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:16lm5en7]
Asociar BtnBmp a una tecla de funcion
Albeiroval, Francisco: Muy buena la solucion, gracias. Atentamente, Rolando.
Asociar Extencion de Archivos a mi Aplicación
Saludos: De nuevo aqui con mis marcianadas <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: --> y preguntas extrañas <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> para todo el foro: Es posible asociar una extencion de un archivo (p.e. *.VIC) con mi aplicación y a la vez colocar un ícono para distinguirlo, pongo como ejemplo una utilidad muy conocida por todos nosotros y que es para visualizar archivos .DBF (me refiero a Prometehus DATABASE WORKSHOP de Andrade A. Daniel). lo necesito para mi aplicación ya que pretendo asociar archivos de ayuda en la misma. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Esperando propuestas y soluciones: Soluciones y Diseño de Software Empresarial I.S.C Víctor Daniel Cuatécatl León <!-- w --><a class="postlink" href="http://www.sisa.unlugar.com">www.sisa.unlugar.com</a><!-- w -->
Asociar Extencion de Archivos a mi Aplicación
Saludos al todo el distiguido foro: Ok. haciendo pruebas e investigando un poco sobre claves del registro de windows he llegado a la conclusion de que si se puede hacer esta "trampita" que permite disfrazar cualquier extenciòn de archivo a y asociarla a nuestra aplicación. ¡¡ CUIDADO !! Es pa toda la gente que le gusta ser cremosa y que gustan que sus aplicaciones se vean a veces medias cursis, pero es a fin y al cabo una aportaciòn màs. por ejemplo: si queremos que nuestros archivos .DBF tengan un ìcono y asosiarlo a nuetra aplicaiòn yo lo hago de la siguiente forma: Registra(".DBF","baseddatos.aplicacion","Mi tabla de trabajo",14) y esta el la funciòn que se encarga de este truco: #Include "FIVEWIN.CH" #ifndef __XPP__ #define HKEY_CLASSES_ROOT 2147483648 #define HKEY_CURRENT_USER 2147483649 #define HKEY_LOCAL_MACHINE 2147483650 #define HKEY_USERS 2147483651 #define HKEY_PERFORMANCE_DATA 2147483652 #define HKEY_CURRENT_CONFIG 2147483653 #define HKEY_DYN_DATA 2147483654 #else #define HKEY_CLASSES_ROOT 1 #define HKEY_CURRENT_USER 2 #define HKEY_LOCAL_MACHINE 3 #define HKEY_USERS 4 #define HKEY_PERFORMANCE_DATA 5 #define HKEY_CURRENT_CONFIG 6 #define HKEY_DYN_DATA 7 #endif //-------------------------------// FUNCTION Registra(cExten,cCadena,cTipo,nIcono) LOCAL oReg LOCAL cAplicacion:= UPPER(ALLTRIM(GetModuleFileName(GetInstance()))+","+ALLTRIM(STR(nIcono))) oReg:= TReg32():CREATE( HKEY_CLASSES_ROOT, cExten ) oReg:SET( "", cCadena ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"+cExten ) oReg:= TReg32():CREATE( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"+cExten+"\OpenWithList" ) oReg:= TReg32():CREATE( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"+cExten+"\OpenWithProgids" ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_LOCAL_MACHINE, "Software\Classes\"+cExten ) oReg:SET( "", cCadena ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_CLASSES_ROOT, cCadena ) oReg:SET( "", cTipo ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_CLASSES_ROOT, cCadena+"\DefaultIcon" ) oReg:SET( "", cAplicacion ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_LOCAL_MACHINE, "SOFTWARE\Classes\"+cCadena ) oReg:SET( "", cTipo ) oReg:CLOSE() oReg:= TReg32():CREATE( HKEY_LOCAL_MACHINE, "SOFTWARE\Classes\"+cCadena+"\DefaultIcon" ) oReg:SET( "", cAplicacion ) oReg:CLOSE() RETURN nil Donde: cExten: Es la estención a Asociar. esta debe ser antrecedida por punto (.) cCadena: es la cadena de caracteres donde se crea la clave en el registro. cTipo: Aky podemos poner una leyenda para verla en el explorador. nIcono: Este es el nùmero de icono para identificarlo, comienza desde 0 ya que es el primer icono con el que comienza nuetra aplicaciòn. Esta es la soluciòn que tengo implantada en mi aplicaciòn y le da màs vistosidad a los archivos, es 100% funcional, y no interfiere con otros archivos asociados a otras aplicaciones... estoy trabajando para que al hacer doble click el archivo sea abierto por nuetra aplicaciòn, esto serà proximamente.. Saludos y nos escribimos luego.. I.S.C. Vìctor Daniel Cuatècatl Leòn. <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Asociar Extencion de Archivos a mi Aplicación
Victor, Gracias! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Asociar Extencion de Archivos a mi Aplicación
Hola de nuevo al Foro: A solicitud de un Colega Peruano, que me Solicito Via MP la contibuación de éste Post de hace ya unos años, re-abro y continuo este post, ojala le sea de utilidad... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Si bien ya era posible dentro de mi Sistema asociar un archivo ".123" a una "X" Aplicación para tomar el icono numero "N" y tener un mejoramiento visual a los archivos "disfrazados" de nuestra aplicación, me di a la tarea de hacer que estos archivos fueran tambien abiertos fuera del Sistema con tan solo dar doble click. Para no ser tan extenso todo este cuento les dejo los fuentes y los ejecutables de 2 aplicaciones 1.- REGISTRAR.PRG (.EXE) : Se encarga de Registrar nuestro archivo con extención ".123" a Nuestra Aplicación "X", por falta de tiempo me falto explorar el ejecutable a Asociar, vizualizar los iconos y devolver el numero de icono seleccionado ( Lo que esta en el Dibujo06 ) [url=http&#58;//img691&#46;imageshack&#46;us/i/dibujo02t&#46;jpg/:1af4cbrd][img:1af4cbrd]http&#58;//img691&#46;imageshack&#46;us/img691/2618/dibujo02t&#46;jpg[/img:1af4cbrd][/url:1af4cbrd] Para entender mejor como funciona este ejemplo adjunto el código fuente, solo hay que jugar y entender la lógica del Registro de Windows con respecto a las Aplicaciones tanto para apertura y asosiación, como solo para asosiación de archivos. 2.- BROWSER.PRG (.EXE) : Es un simple Visualizador de Bases de Datos, solo eso, no permite Edición ni nada, solo es un ejemplo de como es posible abrir un archivo asosiado a una aplicación, ya sea abriendola desde el mismo Editor, arrastrando y soltando dentro del Editor, o con doble Click. La único que incorpore en este editor fue la posibilidad de poder revisar si el archivo que se pretende abrir es una DBF o no, para mayor control y no modificar archivos con lo que no es. [url:1af4cbrd]http&#58;//www&#46;megaupload&#46;com/?d=PDUF9L9G[/url:1af4cbrd] Espero y les sirva, solo me falta la opción de vizualizar los iconos de un .EXE, y en base al icono que se haya seleccionado guardarlo en el registro, por defecto toma el icono del exe para la Asosiación. [url=http&#58;//img259&#46;imageshack&#46;us/i/dibujo06t&#46;jpg/:1af4cbrd][img:1af4cbrd]http&#58;//img259&#46;imageshack&#46;us/img259/307/dibujo06t&#46;jpg[/img:1af4cbrd][/url:1af4cbrd] Si alguien más puede aportar a este modulo se lo agradeceré, de todas maneras seguire investigando como hacerlo... Estimado Juan Carlos Canals, espero sea de ayuda... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Saludos..
Asociar Extencion de Archivos a mi Aplicación
Estimado Victor, anoche lo bajé y era justo lo que necesitaba, mil gracias <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Asociar Extencion de Archivos a mi Aplicación
Amigo Excelente aporte... Muchas Gracias
Asociar Extencion de Archivos a mi Aplicación
Despues de unos dias de investigación de como dibujar los iconos con el Api de Windows y haciendo conversiones con VB6 y los controles de Fivewin que era lo que faltaba, porfin queda termnada esta utilidad, con su corespondiente actualización, ahora se ve así y se puede seleccionar el icono a Asociar. [url=http&#58;//img121&#46;imageshack&#46;us/i/dibujosyk&#46;jpg/:mtilnopf][img:mtilnopf]http&#58;//img121&#46;imageshack&#46;us/img121/5043/dibujosyk&#46;jpg[/img:mtilnopf][/url:mtilnopf] Para los que lo hayan bajado y quieran actualizarlo les doy el enlace.. [url:mtilnopf]http&#58;//www&#46;megaupload&#46;com/?d=2WM43LYI[/url:mtilnopf] Esperando que a alguien más le pueda servir.. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> Saludos...