topic
stringlengths
1
63
text
stringlengths
1
577k
Acceder a MSSQL
Error in "oCn: Open (xConnect)" something must be wrong, as would do to connect to the IP, my data server has the IP 192.168.1.99 or http:serverdat.net? regards
Acceder a MSSQL
Willi You can use the IP address of your server or the Server name. Make sure your userid, password and database name are correct. You can use the Microsoft SQL Management Studio that comes with Sql Server to login to your database to test your connection credentials. Rick Lipkin
Acceder a MSSQL
Hola Rick , le hago una pregunta. usted seria tan amable si posee una conexión de esta forma para MySql. ya que veo esta mas avanzado que yo.
Acceder a MSSQL
Juan Take another look at my sample .. Ms Sql Server uses the built in Ole Provider called SqlOleDb which is on every Windows machine from Xp thru Windows 8. There is nothing to configure or any setup needed on the workstation. That is what makes connecting to Ms Sql Server so nice. You do not need to distribute any Ole Client, run-time or Odbc to the desktop.. All you need to do is make sure your connection credentials are setup properly on your Sql Server and use ADO to manage and manipulate the data. Rick Lipkin
Acceder a MariaDB
Bien, me uno al grupo, soy bastante novato y espero aprender para poder ayudar en su dia... Estoy intentando hacer una pequeñiiiisima aplicación que funcione accediendo a datos en un Servidor MariaDB. Alguien lo está utilizando??? Algun ejemplo de su uso, sencillo, para empezar.??? Si bien el link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=33&t=31621&start=0&hilit=fivetouch+webservice">viewtopic.php?f=33&t=31621&start=0&hilit=fivetouch+webservice</a><!-- l --> es el que deberia de darme un poco de luz... lo hecho andar, pero no rula... #include "FiveTouch.ch" FUNCTION Main() SET DELETE ON SET CENTURY ON SET ESCAPE ON SET DATE ITALIAN SETCANCEL(.T.) CLEAR SCREEN DEFINE DIALOG oDlg oDlg:setWindowTitle( "Gestione Prezzi" ) @ 90, 220 BUTTON oBtnImp PROMPT "test_htip()" OF oDlg ; ACTION test_htip() @ 250, 90 BUTTON oBtnEnd PROMPT "Salir" OF oDlg ; ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED return nil // ------------------------------- CREA_FILE PROCEDURE test_htip() LOCAL oHttp, hQuery, cResponse hQUery := { => } hb_HCaseMatch( hQuery, .F. ) oHttp := TIPClientHTTP():New( "http://adaptaproyectoserp.com.ve/webservices/client.php", .T. ) hQuery[ "nombre" ] := "THefull The BEST!" IF ! oHttp:open() ? "Error: oHttp:open(): " + oHttp:lastErrorMessage() RETURN ENDIF IF ! oHttp:post( hQuery ) ? "Error: oHttp:post(): " + oHttp:lastErrorMessage() ENDIF cResponse := oHttp:readAll() oHttp:close() Alert( cResponse ) RETURN Alguien que pueda orientarme??? Si hay que montar un webservice, o el Servidor MariaDB??? Cómo montar un webService, y cual??? Gracias. Un Saludo, Xevi.
Acceder a MariaDB
Xevi, Aqui tienes la conferencia de Rafa Carmona sobre Servidor web & web services y su uso desde Harbour <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [url:3hwo4yp7]https&#58;//youtu&#46;be/ivWorfpnnMs[/url:3hwo4yp7]
Acceder a MariaDB
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34934&start=0">viewtopic.php?f=6&t=34934&start=0</a><!-- l -->
Acceder a MariaDB
Un ejemplo muy simple en PHP: [url:2keqeg78]https&#58;//www&#46;leaseweb&#46;com/labs/2015/10/creating-a-simple-rest-api-in-php/[/url:2keqeg78]
Acceder a dbf mediante ado
Hola me podrían decir como hago esta conexión?
Acceder a dbf mediante ado
Hola Jorge, [code=fw:2nbduv5p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oCn, oRs, aStates<br /><br />   <span style="color: #00C800;">LOCAL</span> lShowError := .F.<br /><br />   cPathCnx := <span style="color: #ff0000;">"D:<span style="color: #000000;">\f</span>wh<span style="color: #000000;">\s</span>amples"</span>              <br />   cSql     := <span style="color: #ff0000;">"SELECT * FROM Clients.dbf"</span> <br /><br />   <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> oCn := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> cPathCnx , lShowError <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span><br />      <span style="color: #00C800;">if</span> <span style="color: #000000;">&#40;</span> oRs   := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, cSql <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> != <span style="color: #00C800;">nil</span><br />         oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">&#40;</span>oRs,<span style="color: #ff0000;">"oRs"</span><span style="color: #000000;">&#41;</span><br />         oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />         nCol := <span style="color: #000000;">1</span> <br />         aStates := ArrTranspose<span style="color: #000000;">&#40;</span> oRs:<span style="color: #000000;">GetRows</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> nCol <span style="color: #000000;">&#93;</span>     <span style="color: #B900B9;">// *** Toma sólo la nCol columna. Es decir es un array aStates[n,n] *** //</span><br />         oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">else</span><br />         ? <span style="color: #ff0000;">"Open Table Fail"</span><br />      <span style="color: #00C800;">endif</span><br />      oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">else</span><br />      ? <span style="color: #ff0000;">"Connect Fail"</span><br />   <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aStates<br /><span style="color: #B900B9;">//--------------------------------------------------------------------------------------//</span></div>[/code:2nbduv5p]
Acceder a dbf mediante ado
Carlos, gracias por responder. le puse lShowError := .t. para que muestre el error y me dice que no se encuentra el especifico el nombre del origen de datos y no se especifico ningún controlador predeterminado. debo instalar un controlador?
Acceder a dbf mediante ado
No driver or provider need to be installed for using DBFs without FPT files. The default Jet OLEDB provider that comes bundled with Windows OS is enough. FWH ADO functions take care of everything for you Establishing a connection. [code=fw:1j2btye0]<div class="fw" id="{CB}" style="font-family: monospace;">oCn := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> foldername <span style="color: #000000;">&#41;</span></div>[/code:1j2btye0] Now all DBF tables (not dbfcdx tables having fpt memo files) are available as tables in this connection. Open any table with [code=fw:1j2btye0]<div class="fw" id="{CB}" style="font-family: monospace;">oRs := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, <span style="color: #ff0000;">"states"</span> <span style="color: #000000;">&#41;</span></div>[/code:1j2btye0] to use states.dbf OR [code=fw:1j2btye0]<div class="fw" id="{CB}" style="font-family: monospace;">oRs := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, <span style="color: #ff0000;">"select first,salary from customer"</span> <span style="color: #000000;">&#41;</span></div>[/code:1j2btye0] Now deal with the oRs like any other ADO recordset. For using dbfcdx tables (i.e., dbf tables with fpt memo files), we need to download and install vfpoledb provider If you start working we can keep supporting you.
Acceder a dbf mediante ado
Mr. Rao, excelente, funciono perfecto. También necesito usar algunas dbfcdx con memo (dbf y fpt), me podría informar como?
Acceder a dbf mediante ado
Download and install VFPOLEDB provider from <!-- m --><a class="postlink" href="https://www.microsoft.com/en-us/download/details.aspx?id=32602">https://www.microsoft.com/en-us/downloa ... x?id=32602</a><!-- m --> and install After that open connection object [code=fw:jm5otzcm]<div class="fw" id="{CB}" style="font-family: monospace;">oCn := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"FOXPRO"</span>, cfoldername <span style="color: #000000;">&#125;</span>, .T.<span style="color: #000000;">&#41;</span></div>[/code:jm5otzcm] Now you can use DBFCDX dbf files with fpt memo files
Acceder a dbf mediante ado
Excelente Mr. Rao. Entonces, de esta manera, podemos usar de la misma forma sql y dbf solo cambiando la cadena de conexión? Muchas gracias
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Buenas a todos. A ver si alguien sabe decirme como acceder a la estructura interna de HB_ITEM en Harbour (no en xHarbour). Concrétamente quiero acceder a la dirección de: myItem->item.asString.length // OJO, no al valor si no a la dirección. Como ejemplo: myItem->item.asString.value; puedo acceder así: char * miPuntero = myItem->item.asString.value; o con la función: char * miPuntero = hb_itemGetCPtr( myItem ); // Esta es la aconsejable Pero para myItem->item.asString.length, cómo? Hay alguna función que haga lo mismo que hb_itemGetCPtr( myIyem ) pero para myItem->item.asString.length? <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: --> <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> <!-- s:arrow: --><img src="{SMILIES_PATH}/icon_arrow.gif" alt=":arrow:" title="Arrow" /><!-- s:arrow: -->
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Manuel Harbour trabaja internamente por omision de forma protegida para que no puedas hacer eso, pero eso no implica que no exista forma de hacerlo debes compilar con el define "_HB_API_INTERNAL_" te dejo un ejemplo y la linea que de comando que uso para ejecutarlo [code=fw:12wui66m]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> &nbsp;main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; prueba<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"hello world!"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span>PRUEBA<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; PHB_ITEM miPuntero = hb_itemNew<span style="color: #000000;">&#40;</span><span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; const char * c = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; hb_itemPutC<span style="color: #000000;">&#40;</span> miPuntero, c <span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%s %d"</span>, miPuntero->item.asString.value, miPuntero->item.asString.length<span style="color: #000000;">&#41;</span>;<br /><br />&nbsp; &nbsp; hb_itemRelease<span style="color: #000000;">&#40;</span> miPuntero <span style="color: #000000;">&#41;</span>; <br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:12wui66m] linea de comando: hbmk2 test -cflag=-D_HB_API_INTERNAL_
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Muchas gracias Daniel... Quería evitar eso precisamente. si existiera una función que devolviera la dirección sería lo ideal para mí: ... return &miPuntero->item.asString.length; Se te ocurre algo? <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Manuel podrias hacerlo asi... [code=fw:17sfid6r]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span>  main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    prueba<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"hello world!"</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <hbapiitm.h><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span>PRUEBA<span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />    PHB_ITEM miPuntero = hb_itemNew<span style="color: #000000;">&#40;</span><span style="color: #00C800;">NULL</span><span style="color: #000000;">&#41;</span>;<br /><br />    const char * c = hb_parc<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>;<br /><br />    int * i;<br /><br />    hb_itemPutC<span style="color: #000000;">&#40;</span> miPuntero, c <span style="color: #000000;">&#41;</span>;<br /><br />    i = &<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>int<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span>miPuntero->item.asString.length<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;<br /><br />    printf<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"%s %d"</span>, miPuntero->item.asString.value, *i<span style="color: #000000;">&#41;</span>;<br /><br />    hb_itemRelease<span style="color: #000000;">&#40;</span> miPuntero <span style="color: #000000;">&#41;</span>; <br /><br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP</div>[/code:17sfid6r]
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Ya Daniel, pero lo que quiero es evitar usar la estructura ITEM. Lo que quiero es usar una función al estilo hb_itemGetCPtr( myItem ) pero para el puntero a myItem->item.asString.length ya así mo tener que ir en contra de las recomendaciones del equipo de Harbour. Mira: //-------------------------------------- HB_SIZE hb_itemGetCLen( PHB_ITEM pItem ) { HB_TRACE( HB_TR_DEBUG, ( "hb_itemGetCLen(%p)", pItem ) ); if( pItem && HB_IS_STRING( pItem ) ) return pItem->item.asString.length; else return 0; } //-------------------------------------- Pues en vez de eso me gustaria que en las funciones del ITEM API hubiera una que devuelva el puntero y no el valor. Así no tendría que usar la directiva no recomendada _HB_API_INTERNAL_ long * hb_itemGetCPtrLen( PHB_ITEM pItem ) { if( pItem && HB_IS_STRING( pItem ) ) return &pItem->item.asString.length; else return NULL; } //--------------------------------------
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Daniel si conoces a alguien del equipo de harbour y de xharbour podrías pedirle que incluyan la función? [code=fw:4ay4swho]<div class="fw" id="{CB}" style="font-family: monospace;"><br />HB_SIZE * hb_itemGetCPtrLen<span style="color: #000000;">&#40;</span> PHB_ITEM pItem <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> pItem && HB_IS_STRING<span style="color: #000000;">&#40;</span> pItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span> &pItem->item.asString.length;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; <span style="color: #00C800;">else</span><br />&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">NULL</span>;<br />&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:4ay4swho] Podrás? <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Olvidate Daniel. Escribí a Przemek y me ha dado una amplia explicación de porqué no está ni estará <!-- s:-( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":-(" title="Sad" /><!-- s:-( -->
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Manuel por curiosidad cual es la explicacion que te dieron?
Acceder a la estructura HB_ITEM en Harbour. Daniel o Antonio
Jajaja te pica la curiosidad no? Te la transcribo tal cual, ya sabes que Przemek se esplaya: There are few serious problems with such function. It operates on pointer to item body which may change if some other code change the item value. In such case modifying the value at pointer address will corrupt new item and maybe HVM HVM expect that all strings are CHR(0) ended in many different places. Strings without this condition may cause HVM crash. But if you try to update string body then it may corrupt many other string items two. String items are shared and copy on write mechanism is used. If you change one string then you will also change all other string items which share item value. You cannot change string item body or string item length because it may effect more then one item. In the worst case you will overwrite one of internal buffers used for shared string values changing all strings which may store such value even if they will be created in the future, i.e. all one byte strings are pointers to execatly the same memory area. Constant strings are pointers to PCODE so if you change them then PCODE is changed too and will give different results executed next time. Additionally if you try to write to static readonly buffer on systems with hardware readonly memory protection it will cuase GPF. There are also any other bad side effects. I cannot imagine where such function can be safely used without risk of internal HVM corruption. IMHO you should rethink what you are trying to do and how to avoid manipulations in HVM intenral area. best regards, Przemek
Acceder a los datos de un listbox
Muy buenas, alguien me podría decir, como puedo acceder a los datos de un listbox haciendo referencia a oTbr Gracias.
Acceder a los datos de un listbox
Te refieres a un browse ó a un listbox que usa un conjunto de elementos ?
Acceder a sistema desde ubicaciones remotas.
Estimados co-listeros, me inmagino que mas de uno ya habra evaluado esta necesidad, en resumen : Tengo un servidor windows 2000, ahi tengo instalada mi aplicacion FW, tengo 3 versiones de la misma, puedo usar cualquier FW-Clipper-DBFCDX FWH-xHarbour-DBFCDX y FWH-xHarbour-MySQL. Obviamente de manera local en mi RED ingresamos varios usuarios sin problemas. Pregunta : de que manera, con que software, cual es la mejor forma de acceder al sistema que esta en el servidor, como si fuera un usuario mas de la RED, osea no solo una conexion remota sino unas 10 o mas. Alguien tiene experiencia, resultados concretos. Muchas gracias por sus comentarios
Acceder a sistema desde ubicaciones remotas.
hola enrique, yo lo tengo en mi empresa y lo estoy haciendo con conexion mediante terminal server sobre una aplicación echa en fivewin + clipper con dbfcdx, la velocidad es muy buena. saludos.
Acceder a sistema desde ubicaciones remotas.
Terminal Server, ese es algo que viene con WinXP y Windows 2000 o 2003 server creo ? Sabes si necesito IP Fija ?? Por favor algun link donde pueda acceder a informacion de como trabajar con Terminal Server ?? Muchas gracias por contestar
Acceder a sistema desde ubicaciones remotas.
Hola Tambien puedes usar no-ip, si no tienes una ip fija o igualmente si la tienes. esta la direccion para mas informacion <!-- w --><a class="postlink" href="http://www.no-ip.com">www.no-ip.com</a><!-- w --> Saludos Marco A. Delgado
Acceder a sistema desde ubicaciones remotas.
Lo del IP me queda claro... pero lo del terminal server ni idea. ¿Alguien podría darnos los pasos por favor? Gracias
Acceder a sistema desde ubicaciones remotas.
Lo de terminal server depende muchismo del ancho de banda que tengas, y del "punch" que tenga el servidor. Actualmente tenemos un cliente que tiene 25 conexiones remotas con terminal server sobre un ancho de banda de 1.3 Mbps, a un procesador Xeon de 2.4 GHZ con 1 GByte de memoria ram y la aplicacion es tremendamente lenta, sin embargo cuando tienes menos de 10 usuarios la velocidad es aceptable y funciona bien , para atender a los 25 usuarios remotos tendiramos que duplicar la capacidad del server metiendo otro procesador y otro Gbyte de memoria mas y doblar el ancho de banda pero el presupuesto no nos llega. La solucion a estos problemas ha sido en todo caso, montar una VPN y utilizar Advantage Internet Server o bien la conexion internet de MySQL. La solucion de terminales remotas que tenemos se basa mas que nada en conexiones diretamente a la IP del servidor mediante puertos, tanto para MySQL como para Advantage, con eso le hemos quitado carga de trabajo al servidor y lo hemos dejado solo para manejo de la base de datos, en vez de dividirlo entre procesamiento y servidor de bd.
Acceder a sistema desde ubicaciones remotas.
Rene, una consulta, Yo he probado trabajar directamente via el IP a mi BD MySQL pero alojada en un proveedor de Hosting externo, y me parecio demasiado lento, si monto Yo un server con IP y la BD MySQL acceder a la BD via IP no depende tambien de un Super Ancho de Bando y un maquinon ??? Gracias por tus comentarios
Acceder a sistema desde ubicaciones remotas.
Enrrique, Terminal Server es un sistema operativo para servidor. Por lo tanto caer en ésta categoría tiene un costo de 1,200 a 2,500 dolares. Este costo me lo paso un amigo. El Internet information server de ADS tiene un costo de 2,490 euros... <!-- w --><a class="postlink" href="http://www.abox.com">www.abox.com</a><!-- w --> Xhabour + mysql ¿¿Para ejecutar un programa fivewin via internet?? Más bien, creo que es para consultar y agregar información a una base de datos. Otra idea es que te planteras el consultar las bases de datos que están en tu servidor windows 2000. Siendo asi la solución podría ser usando xbscript y tiene un costo de 395 dolares. Entonces puedes agregar, modificar, consultar DBFs via internet.... <!-- w --><a class="postlink" href="http://www.xharbour.com">www.xharbour.com</a><!-- w -->
Acceder a sistema desde ubicaciones remotas.
[quote="Enrrique Vertiz":t2aeu02k]Rene, una consulta, Yo he probado trabajar directamente via el IP a mi BD MySQL pero alojada en un proveedor de Hosting externo, y me parecio demasiado lento, si monto Yo un server con IP y la BD MySQL acceder a la BD via IP no depende tambien de un Super Ancho de Bando y un maquinon ??? Gracias por tus comentarios[/quote:t2aeu02k] NO, si tu te lo montas "en casa" no tienes problemas: 1) Los hostings comerciales no siempre estan en tu mismo pais, por lo tanto tienes que dar un montol de saltos sobre Internet para llegar hasta el servidor MySQL de tu proveedor de hosting, lo mismo nos pasa aqui con los demos de Advantage Internet Server que tenemos en nuestra pagina web (<!-- w --><a class="postlink" href="http://www.google.d2g.com/ads/demos/">www.google.d2g.com/ads/demos/</a><!-- w -->), si tu lo corres dentro de Mexico, aun con un moden de 56 kbps es alucinantemente rapido, si te lo llevas a USA funciona bien, pero si lo tratas de ejecutar desde España por ejemplo, es bastante lento, la razon: el numero de saltos que tienes que dar para llegar al servidor. 2) En un hosting comercial, el ancho de banda esta compartido no solo por ti, sino por toda la gente tiene contratados servicios, por eso mismo, los proveedores restringen el ancho de banda y lo dividen en cargas que aprovechen para surtir el servicio a todos los clientes, con lo cual el montaje del servidor sobre un hosting comercial tampoco es una opcion. Si te lo quieres motnar en casa, te dire que nuestro server para ADS es un Pentium IV a 2.4 GH, tiene 512 Megs de ram y un ancho de banda de 1.3 Mbps ADSL. y nos fuciona de maravilla.
Acceder a sistema desde ubicaciones remotas.
[quote:r61i9bt8]1) Los hostings comerciales no siempre estan en tu mismo pais, por lo tanto tienes que dar un montol de saltos sobre Internet para llegar hasta el servidor MySQL de tu proveedor de hosting, lo mismo nos pasa aqui con los demos de Advantage Internet Server que tenemos en nuestra pagina web (<!-- w --><a class="postlink" href="http://www.google.d2g.com/ads/demos/">www.google.d2g.com/ads/demos/</a><!-- w -->), si tu lo corres dentro de Mexico, aun con un moden de 56 kbps es alucinantemente rapido, si te lo llevas a USA funciona bien, pero si lo tratas de ejecutar desde España por ejemplo, es bastante lento, la razon: el numero de saltos que tienes que dar para llegar al servidor. [/quote:r61i9bt8] A eso me referia con no-ip Actualmente tengo montado un sistema hecho con fwh, xharbour y tmysql y por supuesto con una BD MySQL. Y se conectan alrededor de 20 usuarios y la velocidad es muy aceptable se realizan alrededor de 150 consultas diarias, asi como modificaciones y altas de registros y les dire que tengo como servidor una PIV 2.8 GH con 1 Gb de memoria y un HD de 40 GB. Mi direccion ip no es fija y mediante no-ip todos ellos se pueden conectar a la BD de MySQL sin ningun problema. Saludos Marco A. Delgado.
Acceder a sistema desde ubicaciones remotas.
Saludos, Tu solucion es la siguente: Montate un servidor Linux ( Fedora, Mandriva, etc. Prefiero Fedora ), alli montas tu base de datos MySql, asi como una vpn, adicional a esto hay un script que se llama ddclient para trabajar en Linux esto funciona para dyndns.com. Yo tengo en un servidor 60 conexiones de esa manera. Cada una de esas conexiones realiza unas 300 operaciones diarias.
Acceder a sistema desde ubicaciones remotas.
Amigos, como siempre, aca en el foro hay alternativas varias y siempre apuntando a la solucion, tomare en cuenta sus sugerencias, que en resumen significan montar el MySQL en un server en casa y veremos. Gracias por sus opiniones
Acceder a un Ftp por cable modem
[color=red:19hrxuwf][b:19hrxuwf]Antes que nada quiero saludar a todos los integrantes del foro.[/b:19hrxuwf][/color:19hrxuwf] Mi problema es sobre descargas por FTP, hasta hace un tiempo la mayoria de mis clientes se conectaban por dial up para bajarse las listas de precios, algunos otros con ADSL y todo bien, pero ahora tengo unos nuevos que han contratado cable modem de Arnet/Telecom con un modem Motorola 5101 es el modelo para ser mas preciso y no se puede establecer la conexion. Estoy tratando de verificar con algo los puertos abiertos ya que los proveedores de internet dicen que ellos no cierran nada ni ponen ningun firewall ni nada pero la cosa es que no puedo ver el FTP desde fivewin y si voy por el explorer y coloco mi ip 209.99.22... anda de primera, desde el DOS ejecutando FTP tambien puedo entrar. Sin mas les agradezco desde ya.
Acceder a un Ftp por cable modem
¿ Esta usando windows xp ? Si es asi, entonces revisa que tu programa no este bloqueado por el firewall de windows xp sp2 atte, Lautaro
Acceder a un Ftp por cable modem
El problema se presenta en cualquier windows, y lo que he notado es que en esta problematica siempre las conexiones son via USB, cuando es banda ancha por placa de red el problema no existe. Estoy pensando en que tiene que ver mas con el hardware que con el software. Gracias.
Acceder a un Ftp por cable modem
Carlos, Muéstranos cómo estás usando el código de FTP ? gracias.
Acceder a un Ftp por cable modem
Buenas tardes Carlos, utiliza el programa fport de Foundstone, lo puedes descargar desde aquí: <!-- m --><a class="postlink" href="http://www.foundstone.com/index.htm?subnav=resources/navigation.htm&subcontent=/resources/freetools.htm">http://www.foundstone.com/index.htm?sub ... etools.htm</a><!-- m --> Saludos, Félix
Acceder a un Ftp por cable modem
// Antonio saco todo por que es un prg bastante complejo, // dejo solo las llamadas inherentes al tema define dial... // --------------------------------------------------------------------- // --------------------------------------------------------------------- redefine sbutton ID 101 OF oPrivate:oPags:aDialogs[2] FONToVentPrinc:oFont file m->cpatbmp+"_conecta.bmp"; prompt "Ingresar al servidor" action busftp() text 4 activate dial... return .t. // -------- func busftp() // -------- local oFTP oPrivate:oInternet:=TInternet():New() if !internetSt() internetDi() if !internetSt() oPrivate:oInternet:End() return .f. endif endif // Antonio, aca hace la llamada con LEVFTP msgrun("Ingresando al servidor...","",{|oDlg|levftp(oPrivate:oInternet,oDlg,oFTP)},"_insitio") oPrivate:oInternet:End() return nil //------------------------ func levftp(oInternet,oDlg,oFTP) //------------------------ local aFiles, nItem, recorre, aFiltro:=array(9) local ncannuevos oFTP:=TFTP():New( "209.99.228.215", oInternet, "dbfarma", "farmacia") if empty( oFTP:hFTP ) oDlg:end() // Antonio, sale por este error y por ende no puedo levantar // los datos del servidor msgstop("No se pudo establecer la conexión.") return .f. endif sysrefresh() oDlg:settext("Buscando actualizaciones...") sysrefresh() // Levanto todo el directorio ftp del dbfarma aFilesFtp = oFTP:Directory("*.*")
Acceder a un Ftp por cable modem
Carlos, Estas usando las clases estandard de Windows, debería funcionar. Has probado el ejemplo samples\FTPDir.prg ?
Acceder a un Ftp por cable modem
Estoy usando las classes estandar, de hecho agregue un mensaje en TInternet y TFtp, las compile y las agregue en el LNK para ver si surtia algun cambio y nada sigue igual. Tambien probe los ejemplos pelados sin nada de proceso solo apertura y nada. Probe tambien esta funcion que esta en los Samples\SylInt.prg // Working with Internet Classes /* I tried to do my best to give you all necessary information to gain the perfect control over all internet function that can be manage with Fivewin for sure we can add some more (http function) but we don't have any control to display HTML text so that's why I didn't test it. Must of internet function that open session dial automaticaly the internet if you set the parameter for, but a better practice to AVOID GPF is to: 1- Check with InternetSt() if a connection is already establish 2- If not Establish connect with InternetDi() or InternetAu() 3- Do your work 4- Hangup with InternetHa() or InterautHa() Hope it will help Fivewin user */ #include "FiveWin.ch" #include "menu.ch" //----------------------------------------------------------------------------// function Main() etc, etc, ... return nil //----------------------------------------------------------------------------// function BuildMenu() etc, etc, ... MENUITEM "Get archivo" ACTION FTPGET() return oMenu Function Flushdenet() Function FTPGET() // mise a jour des constantes de salaire Local hftp Local n1:=0,message:=space(500),n2:=500 if (hftp:=InternetConnect(onet,"209.99.228.215",21,"dbfarma","farmacia",1,2,0)) == 0 msginfo("Sorry can't connect to FTP site:"+str(getlasterror())) if Intrespinf(@n1,message,@n2) msginfo("message:="+message) endif else // Change the filename by the one you want to get from the FTP site if ! Ftpgetfile(hftp,"aviso.MEM","c:\tmp\aviso.mem",1,128,2,0) msginfo("Getlat:="+str(getlasterror())) if Intrespinf(@n1,message,@n2) msginfo("message:="+message) endif endif msginfo("Done!") Internetclosehandle(hftp) endif return .t. Probe Qftp aunque con problemas con el .ch que no era el correcto, compile como pude y nada. Acabo de venir del cliente y estuve probando un exe pelado y aparentemente a la conexion la detecta bien InternetSt() retorna conectado, el problema esta en la definicion del objeto oFTP:=TFTP():New( "209.99.228.215", oInternet, "dbfarma", "farmacia") esto devuelve vacio. Tambien estuve chequeando los puertos para ver si habia algo (troyano/espia/virus) que lo tuviere abierto, lo hice on line desde <!-- m --><a class="postlink" href="http://www.upseros.com/portscan.php">http://www.upseros.com/portscan.php</a><!-- m --> y nada estaba cerrado, en un XP me dió INVISIBLE pero bueno ahi anda. Les copie mi WinInet.dll de mi pc a la de los clientes y nada, le puse el cable modem por medio de una placa de red y nada, lo que me esta quedando es formatear el equipo pero no tengo muchas ganas de meterme en un lio mas grande sobre todo con la infinidad de giladas que tiene este tio en la pc. En fin Antonio he probado casi todo lo que esta a mi alcance antes de molestar en el foro, aunque se que no es molestia y estoy muy agradecido por la ayuda que todos brindan a esta comunidad. Muchas gracias a ustedes y seguire probando cosas. PD: En algunos clientes que tienen esta porqueria de aparato no les anda el Messenger por ejemplo. ( Motorola SBoard 5101 USB ), lo que si en todos los casos el FTP.exe por DOS anda bien.
Acceder a un programa en forma remorta pasando por un router
hola amigos, necesito entrar a un programa como control remoto, pero pasando por un router dlink, alguien conoce alguna herramienta que permita hacer esto
Acceder a un programa en forma remorta pasando por un router
Hola, Si describirias con mas detalle tu peticion talvez pueda ayudarte.. Salu2 Willi
Acceder a un programa en forma remorta pasando por un router
[quote="Anonymous":vk5d1zx6]hola amigos, necesito entrar a un programa como control remoto, pero pasando por un router dlink, alguien conoce alguna herramienta que permita hacer esto[/quote:vk5d1zx6] Tienes que utilizar la opcion de "NAT" o "Virtual Server" que tienen todos los routers. En esa opcion deberas indicar que puerto vas a abrir y que equipo dentro de la red interna (direccion IP) debe responder a las peticiones
Acceder al checkbox del control datepicker
Hola, ¿Es posible saber si el usuario ha tocado el checkbox del control? Gracias y un saludo
Acceder al checkbox del control datepicker
Jose Luis, Puedes mostrar una imagen del checkbox al que te refieres ?
Acceder al checkbox del control datepicker
Antonio, Con bChanged lo he solucionado. Muchas gracias.
Acceder al oBtn del ACTION de un GET
Hola compañeros, Tengo un GET con una acción que se accede con el botón correspondiente: [code=fw:2267dht0]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oGet<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DOMICILIO"</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">VAR</span> oData:<span style="color: #000000;">DOMICILIO</span> &nbsp;<span style="color: #0000ff;">ACTION</span>…</div>[/code:2267dht0] Quiero establecer un ToolTip para el botón de la ACTION: [code=fw:2267dht0]<div class="fw" id="{CB}" style="font-family: monospace;">oGet<span style="color: #000000;">&#91;</span><span style="color: #ff0000;">"DOMICILIO"</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Texto del tooltip"</span></div>[/code:2267dht0] No funciona, porque oBtn está vacío. Sin embargo, si hago XBROWSER oGet["DOMICILIO"] lo puedo ver. No veo qué hago mal. Muchas gracias.
Acceder al oBtn del ACTION de un GET
Prueba desde la claúsula ON INIT del DIALOG, de esta forma [quote:2bl91ki5] ON INIT ( oGetb:oBtn:cToolTip := { || "Hola Amigos" }, .... ) [/quote:2bl91ki5]
Acceder al oBtn del ACTION de un GET
Muchas gracias, así si que funciona. ¿Pero es posible lograr hacerlo como señalo? La cláusula ON INIT añade un parpadeo al diálogo que tiene un folder.
Acceder al oBtn del ACTION de un GET
El control ha de estar creado antes de poder instanciarlo correctamente, eso suele ocurrir con los controles definidos en dialogs, y con mayor motivo si están hechos con recursos En cuanto al parpadeo, no entiendo por qué, pon un gif o algo para hacerme una idea del efecto que te produce.
Acceder al oBtn del ACTION de un GET
Muchas gracias Cristóbal. Parpadea todo un momento, no el botón.
Acceder al oBtn del ACTION de un GET
Te he entendido, Eduardo, por eso te he comentado el tema de que me envíes un GIF para ver el efecto que te hace
Accediendo a MySQL
Muy buenas, en nuestros proyectos bajo windows utlizamos libMySQL.dll para el acceso a MySQL, mi pregunta es, ¿se puede utilizar la misma libreria para tal acceso en Linux? sino por favor decirme como puedo acceder a Mysql. Un Saludo.
Accediendo a MySQL
Si se puede, pero no usando la DLL de Windows, sino la librería de enlace dinámico de MySQL propia para Linux.
Accediendo a MySQL
[quote="softruz":xp9n5i2g]Muy buenas, en nuestros proyectos bajo windows utlizamos libMySQL.dll para el acceso a MySQL, mi pregunta es, ¿se puede utilizar la misma libreria para tal acceso en Linux? sino por favor decirme como puedo acceder a Mysql. Un Saludo.[/quote:xp9n5i2g] Estimado: Tienes algún correo donde poder realizarte algunas consultas? Gracias
Accediendo a MySQL
Muy Buenas, dime tu email y te envio mi email. ¿Alguien tiene algún ejemplo de como acceder a MysQL? Un Saludo.
Accediendo a MySQL
Pasarse por: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=12&t=17612">viewtopic.php?f=12&t=17612</a><!-- l --> Un Saludo.
Accediendo a MySQL desde FiveTouch
En este ejemplo construimos un browse con el resultado de una consulta SQL en una base de datos remota MySQL: mysql.prg [code=fw:3d096qi4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveTouch.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg := QDialog<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oLayout := QVBoxLayout<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oBrw := QTableView<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aRows := GetData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> n, m, aKeys := hb_HKeys<span style="color: #000000;">&#40;</span> aRows<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oModel := QStandardItemModel<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aRows <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span>, oDlg <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />      oModel:<span style="color: #000000;">SetHorizontalHeaderItem</span><span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span>, QStandardItem<span style="color: #000000;">&#40;</span> aKeys<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aRows <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />         oModel:<span style="color: #000000;">SetItem</span><span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span>,m - <span style="color: #000000;">1</span>, QStandardItem<span style="color: #000000;">&#40;</span> hb_HGet<span style="color: #000000;">&#40;</span> aRows<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, aKeys<span style="color: #000000;">&#91;</span> m <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">next</span><br />   <span style="color: #00C800;">next</span><br /><br />   oDlg:<span style="color: #000000;">SetLayout</span><span style="color: #000000;">&#40;</span> oLayout <span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">SetModel</span><span style="color: #000000;">&#40;</span> oModel <span style="color: #000000;">&#41;</span><br />   oLayout:<span style="color: #000000;">AddWidget</span><span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   oDlg:<span style="color: #000000;">SetWindowTitle</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A browse"</span> <span style="color: #000000;">&#41;</span><br />   oDlg:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">500</span>, <span style="color: #000000;">400</span> <span style="color: #000000;">&#41;</span> <br />   oDlg:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oDlg:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> GetData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> oClient  := 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://www.fivetechsoft.com/webservice.php"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> hRequest := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">LOCAl</span> hParams  := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">LOCAl</span> cJson<br /><br />    <span style="color: #00C800;">if</span> oClient:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <br />    <br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"database"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"fivetech_webservice"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"username"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"fivetech_test"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"password"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"webservice"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"sql"</span>      <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"SELECT * FROM `users`"</span><br />        <br />        oClient:<span style="color: #000000;">oUrl</span>:<span style="color: #000000;">AddGetForm</span><span style="color: #000000;">&#40;</span> hParams <span style="color: #000000;">&#41;</span><br />        cJson = oClient:<span style="color: #000000;">ReadAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        hb_jsonDecode<span style="color: #000000;">&#40;</span> cJson, @hRequest <span style="color: #000000;">&#41;</span><br />        oClient:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span><br />    <br /><span style="color: #00C800;">return</span> hRequest<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"result"</span> <span style="color: #000000;">&#93;</span><br /> </div>[/code:3d096qi4] [img:3d096qi4]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/fivetouch_mysql1&#46;png[/img:3d096qi4]
Accediendo a MySQL desde FiveTouch
Añadimos algunos botones en la zona inferior del browse: mysql.prg [code=fw:3qj6uz5q]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveTouch.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oDlg := QDialog<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oLayout := QVBoxLayout<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oBrw := QTableView<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aRows := GetData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> n, m, aKeys := hb_HKeys<span style="color: #000000;">&#40;</span> aRows<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oModel := QStandardItemModel<span style="color: #000000;">&#40;</span> Len<span style="color: #000000;">&#40;</span> aRows <span style="color: #000000;">&#41;</span>, Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span>, oDlg <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oButtons := QWidget<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> oLayoutH := QHBoxLayout<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBtnOk, oBtnCancel<br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />      oModel:<span style="color: #000000;">SetHorizontalHeaderItem</span><span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span>, QStandardItem<span style="color: #000000;">&#40;</span> aKeys<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br /><br />   <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aRows <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">for</span> m = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aKeys <span style="color: #000000;">&#41;</span><br />         oModel:<span style="color: #000000;">SetItem</span><span style="color: #000000;">&#40;</span> n - <span style="color: #000000;">1</span>,m - <span style="color: #000000;">1</span>, QStandardItem<span style="color: #000000;">&#40;</span> hb_HGet<span style="color: #000000;">&#40;</span> aRows<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>, aKeys<span style="color: #000000;">&#91;</span> m <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">next</span><br />   <span style="color: #00C800;">next</span><br /><br />   oDlg:<span style="color: #000000;">SetLayout</span><span style="color: #000000;">&#40;</span> oLayout <span style="color: #000000;">&#41;</span><br />   oBrw:<span style="color: #000000;">SetModel</span><span style="color: #000000;">&#40;</span> oModel <span style="color: #000000;">&#41;</span><br />   oLayout:<span style="color: #000000;">AddWidget</span><span style="color: #000000;">&#40;</span> oBrw <span style="color: #000000;">&#41;</span><br /><br />   oLayout:<span style="color: #000000;">AddWidget</span><span style="color: #000000;">&#40;</span> oButtons <span style="color: #000000;">&#41;</span><br />   oButtons:<span style="color: #000000;">SetLayout</span><span style="color: #000000;">&#40;</span> oLayoutH <span style="color: #000000;">&#41;</span><br />   oLayoutH:<span style="color: #000000;">AddWidget</span><span style="color: #000000;">&#40;</span> oBtnOk := QPushButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   oBtnOk:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #000000;">&#41;</span><br />   oBtnOk:<span style="color: #000000;">Connect</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"clicked()"</span>, <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />   oLayoutH:<span style="color: #000000;">AddWidget</span><span style="color: #000000;">&#40;</span> oBtnCancel := QPushButton<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   oBtnCancel:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cancel"</span> <span style="color: #000000;">&#41;</span><br />   oBtnCancel:<span style="color: #000000;">Connect</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"clicked()"</span>, <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />   oDlg:<span style="color: #000000;">SetWindowTitle</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"A browse"</span> <span style="color: #000000;">&#41;</span><br />   oDlg:<span style="color: #000000;">Resize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">700</span>, <span style="color: #000000;">700</span> <span style="color: #000000;">&#41;</span> <br />   oDlg:<span style="color: #0000ff;">Center</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oDlg:<span style="color: #000000;">Exec</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> GetData<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> oClient  := 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://www.fivetechsoft.com/webservice.php"</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> hRequest := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">LOCAl</span> hParams  := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />    <span style="color: #00C800;">LOCAl</span> cJson<br /><br />    <span style="color: #00C800;">if</span> oClient:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>   <br />    <br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"database"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"fivetech_webservice"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"username"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"fivetech_test"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"password"</span> <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"webservice"</span><br />        hParams<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"sql"</span>      <span style="color: #000000;">&#93;</span> = <span style="color: #ff0000;">"SELECT * FROM `users`"</span><br />        <br />        oClient:<span style="color: #000000;">oUrl</span>:<span style="color: #000000;">AddGetForm</span><span style="color: #000000;">&#40;</span> hParams <span style="color: #000000;">&#41;</span><br />        cJson = oClient:<span style="color: #000000;">ReadAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        hb_jsonDecode<span style="color: #000000;">&#40;</span> cJson, @hRequest <span style="color: #000000;">&#41;</span><br />        oClient:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">endif</span><br />    <br /><span style="color: #00C800;">return</span> hRequest<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"result"</span> <span style="color: #000000;">&#93;</span><br /> </div>[/code:3qj6uz5q] [img:3qj6uz5q]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/fivetouch_mysql2&#46;png[/img:3qj6uz5q]
Accediendo a MySQL desde FiveTouch
Hola Antonio, puedes mostrar el contenido de webservice.php asi veo que haces? Muchas gracias
Accediendo a MySQL desde FiveTouch
Marcelo, Aqui está el código fuente del webservice.php: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?p=219709#p219709">viewtopic.php?p=219709#p219709</a><!-- l -->
Accediendo a MySQL desde FiveTouch
Gracias Antonio, no lo había visto. Perdón. Saludos
Accediendo a un web service desde FiveTouch!!!
Gracias a Rafa Carmona aqui teneis un ejemplo funcionando de como acceder a un web service usando código Harbour y FiveTouch! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Esto abre las puertas a usar cualquier base de datos remota (MySQL, SQL, etc) usando un web service que es la forma recomendada de hacerlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Finalmente podemos usar cualquier motor de base de datos desde FiveTouch! Muchas gracias Rafa!!! [code=fw:1a47l6fd]<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 />   <span style="color: #00C800;">LOCAL</span> oHttp, hQuery, cResponse<br /><br />   hQUery := <span style="color: #000000;">&#123;</span> => <span style="color: #000000;">&#125;</span><br />   hb_HCaseMatch<span style="color: #000000;">&#40;</span> hQuery, .F. <span style="color: #000000;">&#41;</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://adaptaproyectoserp.com.ve/webservices/client.php"</span>, .T. <span style="color: #000000;">&#41;</span><br />   hQuery<span style="color: #000000;">&#91;</span> <span style="color: #ff0000;">"nombre"</span> <span style="color: #000000;">&#93;</span>    := <span style="color: #ff0000;">"THefull The BEST!"</span><br />   <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 />      ? <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 />      <span style="color: #00C800;">RETURN</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <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 />      ? <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 />   <span style="color: #00C800;">ENDIF</span><br /><br />   cResponse  := oHttp:<span style="color: #000000;">readAll</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oHttp:<span style="color: #000000;">close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   Alert<span style="color: #000000;">&#40;</span> cResponse <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">RETURN</span></div>[/code:1a47l6fd] [img:1a47l6fd]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/webservice_fivetouch&#46;JPG[/img:1a47l6fd]
Accediendo a un web service desde FiveTouch!!!
Usándolo con FiveTouch para Android: [img:1o2ne87c]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/fivetouch_web_service_android1&#46;png[/img:1o2ne87c] [img:1o2ne87c]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/fivetouch_web_service_android2&#46;png[/img:1o2ne87c]
Accediendo a un web service desde FiveTouch!!!
muy bien
Accediendo a un web service desde FiveTouch!!!
Un placer como siempre ayudando a la comunidad <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->
Accelerator keys for buttons ? (SOLVED)
Can a button be activated via a keyboard shortcut instead via mouse ? For example: Alt-N (next). Thank you.
Accelerator keys for buttons ? (SOLVED)
Hi,If you are not talking about the buttons used in the Dialogs, Yes you canuse '&' before the character which you want to use with Alt combinationas under. [code:1o9jx385] Through Code &#58; @ 15,15 BUTTON "&Next" SIZE 35, 12 ; ACTION MsgInfo&#40; "Any action here!" &#41; DEFAULT or Through Resources &#58; REDEFINE BUTTON PROMPT "&Next" ID 120 OF oDlg ACTION oPags&#58;GoPrev&#40;&#41; [/code:1o9jx385] But you can't use keyboard for the buttons used in the toolbar. You have to use mouse to select them. Regards, - Ramesh Babu P [/code]
Accelerator keys for buttons ? (SOLVED)
Rameshbabu:Thank you for the tip, but I need it for a dialog button.
Accelerator keys for buttons ? (SOLVED)
Hi,[code:20w88qvv] >>but I need it for a dialog button&#46; [/code:20w88qvv]I did not understand what you mean. Can you pelease show me thecode.Regards,- Ramesh Babu P
Accelerator keys for buttons ? (SOLVED)
Hi,To my opinion you can only use keyboard shortcuts in button if you are using plain text in the button (e.g. "&Next").If you are using bitmaps into your buttons, you can only use specials keys (function keys, insert, delete, etc.) to be connected to your button.You can do this by using :[code:21qn32ny]SET KEY VK_NEXT TO Your_Function"&#46;[/code:21qn32ny]Good luck.
Accelerator keys for buttons ? (SOLVED)
Thank you guys, problem solved with the &. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Accelerators Keys on TBtnBmp has still some problem?
Dear Antonio, [color=#BF0000:1w6lgj2f][b:1w6lgj2f]* Enhancement: Class TBtnBmp now supports Accelerators keys.[/b:1w6lgj2f][/color:1w6lgj2f] This feature is working when the ::Focus is on BtnBmp() but if ::Focus is on TXBrowse or TWBrowse, it's not working. Just report. Regards, Dutch
Accentuated characters in XP
Guys: I have customers still running in Windows XP. When they type the Alt-number (Alt-165, Alt-164, Alt-160, etc.) combination to get Spanish accentuated characters sometimes it hangs up or displays the wrong characters. This does not happens in Windows 10. Any ideas ? Thank you very much !
Acces of a file with IP Adress
It is possible to do this : select 0 use \\192.168.10.3\DATA\XYZ.DBF How to establish the connection to the server (user name and password) if there is not network letter already mapped ?? Thanks .
Acces of a file with IP Adress
Try using WNetAddCon() function. EMG
Acces of a file with IP Adress
Thanks for this answer . I dont want to use a drive letter because i dont want the user to be able to explore the network drive .
Acces of a file with IP Adress
Sorry, I don't know. EMG
Acces of a file with IP Adress
Jack UNC paths work just fine .. however i would be careful in a WAN environment .. just too many things can happen over long distances .. users still need share rights to your databases .. I use \\server\volume\folder\table.dbf ... all the time and you can set defa to a unc as well and then just select as usual. Rick Lipkin
Acces of a file with IP Adress
Rick, Thanks for your help . How to have access to the server (how to log) before the use of the Unc. I dont want that the user have access to the network drive with explorer . Thanks
Acces of a file with IP Adress
Jack I agree with you .. I have used UNC access for just that reason .. I don't want people running thru a mapped drive with Explorer to get to my application just to open the tables in Excel and really mess things up. You can use either a DNS name like : use (\\myserver\volume\folder\table.dbf) or use ( \\10.1.10.111\volume\folder\table.dbf ) Again .. users will need full rights to the application folder, but it does not need to be mapped. Rick Lipkin
Acces of a file with IP Adress
Rick, Thanks for your help, it works fine .
Acces of a file with IP Adress
Hello Rick, [quote:1r2pnpbu]use (\\myserver\volume\folder\table.dbf) or use ( \\10.1.10.111\volume\folder\table.dbf )[/quote:1r2pnpbu] Could you show how to pass user and password? Thanks in advance Otto
Acces of a file with IP Adress
Otto Your user will need prior authendication rights given to them from their Network Admin .. once they have folder permisions the UNC will work fine .. no userid or password is necessary. This will even work and span servers as long as the proper user permissions are set \\server1\volume\folder\table.dbf \\server2\volume\folder\table.dbf As long as the user has permissions to the above folder on either server .. select 0 use( "\\server1\volume\folder\table.dbf") via DBFCDX shared or select 0 use( "\\server2\volume\folder\table.dbf") via DBFCDX shared will work. If you know the server1 or server2 IP address .. you can substitute the address for the server name Server1 IP is 10.1.34.40 Server2 IP is 10.1.34.41 select 0 use( "\\10.1.34.40\volume\folder\table.dbf") via DBFCDX shared or select 0 use( "\\10.1.34.41\volume\folder\table.dbf") via DBFCDX shared Everything I have said here assumes the above server(s) are within the same organization and firewall .. anything outside of that you will need a different strategy. Hope that helps .. Rick Lipkin
Acces of a file with IP Adress
new Harbour 2.0beta3 support it!! NETIO_CONNECT( "192.168.0.1" ) use net:table1 NETIO_CONNECT( "192.168.0.2" ) use net:table2 use net:192.168.0.3:table3
Accesar a las tablas tipo SQL
Hola buenas tardes estimados, despues de casi 3 años que estuve fuera de programacion, ya reactive de nuevo mi cuenta y restableci mi clave, ya que me sali fuera de la programacion de fivewin. Espero que se encuentren todos bien en este foro tan esplendido que al parecer ya existen nuevas actualizaciones y mejoras, es un gusto saber que aun continuan mejorando el lenguaje y ando desactualizado y creo que ya olvide como programar segun yo. El motivo por el cual estoy segun de regreso es por una necesidad de solicitarles un favor de como accesar al motor de las bases de datos tablas de SQL con un pequeño codigo de programacion en prg de como hacer conexiones y mostrarlo en browse, les adjunto las tablas de sql. Es que necesito extraer alguna informacion de consulta, pero no logro como hacer la conexion o que se necesita instalar en una pc aparte y no estar directamente en el servidor principal que ahi se encuentran la base principal ando perdido en ese detalle de conexiones a las tablas SQL. Espero que con esos datos sea suficiente para el acceso a la tabla. usuario : sa Clave : Solo1$$ Aqui le adjunto en archivo comprimido de las tablas que extrai. [url:g3llvji7]https&#58;//www&#46;4shared&#46;com/account/home&#46;jsp#dir=a_9IZFb7[/url:g3llvji7] Sera que me puedan apoyar al respecto por favor? Espero sus comentarios. Gracias Atte: Adriano C. C.
Accesar a las tablas tipo SQL
Have a look at \samples\adorick.prg ... shows how to make a connection to MS Access .. how to access tables via ADO ( recordsets ) .. browses with xBrowse Rick Lipkin
Accesar a las tablas tipo SQL
[quote="Rick Lipkin":3izt640p]Have a look at \samples\adorick.prg ... shows how to make a connection to MS Access .. how to access tables via ADO ( recordsets ) .. browses with xBrowse Rick Lipkin[/quote:3izt640p] Hola buenos dias Ing. Rick gracias por responder, pero el detalle es este por la extension de la base de datos que no logro ubicarme que no me deja accesar a la tabla, y pues no tengo ni idea que necesito instalar pero en el servidor esta instalado SQL Server Management Studio no se que version sea, pero el detalle por prg es lo que no logro como hacer conexion, no se si tenga que ver estas dos extensiones que de la base de datos, es por eso que adjunte en el archivo comprimido. Estas son las dos bases de datos pero de diferente extension uno es de .mdf y el otro .LDF ct004_MEZZ_CORP_SA_DE_CV_DIC_2014_C.mdf ct004_MEZZ_CORP_SA_DE_CV_DIC_2014_C_log.LDF Y entonces cual de estos es lo que yo necesito accesar, alguien que tenga experiencia y haya logrado conectarse desde programa de un ejemplo de prg de fivewin?, solo necesito hacer consultas a los registros de la base de datos y crear informes, eso es todo lo que se me dificulta es hacer la conexion y por medio de un browse visualizar registros o si el Ing. Nages me puede apoyar al respecto. Gracias y saludos a todos. Atte: Adriano C. C.
Accesar a las tablas tipo SQL
[quote="Rick Lipkin":2div0qsa]Have a look at \samples\adorick.prg ... shows how to make a connection to MS Access .. how to access tables via ADO ( recordsets ) .. browses with xBrowse Rick Lipkin[/quote:2div0qsa] Hola buenos dias Ing. Rick gracias por responder, pero el detalle es este por la extension de la base de datos que no logro ubicarme que no me deja accesar a la tabla, y pues no tengo ni idea que necesito instalar pero en el servidor esta instalado SQL Server Management Studio no se que version sea, pero el detalle por prg es lo que no logro como hacer conexion, no se si tenga que ver estas dos extensiones que de la base de datos, es por eso que adjunte en el archivo comprimido. Estas son las dos bases de datos pero de diferente extension uno es de .mdf y el otro .LDF ct004_MEZZ_CORP_SA_DE_CV_DIC_2014_C.mdf ct004_MEZZ_CORP_SA_DE_CV_DIC_2014_C_log.LDF Y entonces cual de estos es lo que yo necesito accesar, alguien que tenga experiencia y haya logrado conectarse desde programa de un ejemplo de prg de fivewin?, solo necesito hacer consultas a los registros de la base de datos y crear informes, eso es todo lo que se me dificulta es hacer la conexion y por medio de un browse visualizar registros o si el Ing. Nages me puede apoyar al respecto. Gracias y saludos a todos. Atte: Adriano C. C.
Accesar a las tablas tipo SQL
Adriano me parece que tienes que agregarlo desde el sql management studio, presiona attach y selecciona tu archivo .mdf [url=https&#58;//postimg&#46;cc/cKD0fMDb:httjw8ep][img:httjw8ep]https&#58;//i&#46;postimg&#46;cc/cKD0fMDb/82sHU&#46;png[/img:httjw8ep][/url:httjw8ep]
Accesar a las tablas tipo SQL
[quote="artu01":krayeys0]Adriano me parece que tienes que agregarlo desde el sql management studio, presiona attach y selecciona tu archivo .mdf [url=https&#58;//postimg&#46;cc/cKD0fMDb:krayeys0][img:krayeys0]https&#58;//i&#46;postimg&#46;cc/cKD0fMDb/82sHU&#46;png[/img:krayeys0][/url:krayeys0][/quote:krayeys0] Hola gracias Ing. Art01, esa parte ya logre adjuntar el archivo, pero ahora como hacer conexion desde mi codigo fuente de prg y editar la base de datos solo consultar registros es lo que requiero, alguien me puede tirar un ejemplo?. Gracias. Atte: Adriano C. C. <!-- e --><a href="mailto:acc69@hotmail.com">acc69@hotmail.com</a><!-- e -->
Accesar a las tablas tipo SQL
Adriano en el foro puedes encontrar muchos ejemplos de accesar a tablas sql, aqui tienes un ejemplo [code=fw:2yhvhald]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"ado.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br />   xsource:=<span style="color: #ff0000;">"localhost"</span>   <span style="color: #B900B9;">//nombre servidor</span><br />   xCatalog:=<span style="color: #ff0000;">"arturo"</span>     <span style="color: #B900B9;">// nombre bd</span><br />   xUserID:= <span style="color: #ff0000;">"root"</span>       <span style="color: #B900B9;">// user</span><br />   xPassword:=<span style="color: #ff0000;">"123456"</span>    <span style="color: #B900B9;">// password</span><br />   <br />   oCn := FW_OpenAdoConnection<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"SQL"</span>, xSource, xCatalog, xUserID, xPassword <span style="color: #000000;">&#125;</span>, .t. <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> oCn == <span style="color: #00C800;">nil</span><br />      ? <span style="color: #ff0000;">"conexion fallida"</span><br />      <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />   <span style="color: #00C800;">endif</span><br />   ? <span style="color: #ff0000;">"Conexion exitosa"</span><br />   <br />    lRs:=.f.<br />    cSql:= <span style="color: #ff0000;">"SELECT * from tu_tabla "</span><br />     <br />     <br />    <span style="color: #00C800;">TRY</span><br />      oRs   := FW_OpenRecordSet<span style="color: #000000;">&#40;</span> oCn, cSql <span style="color: #000000;">&#41;</span><br />      lRs:=.t.<br />    catch<br />      ? <span style="color: #ff0000;">"Error en lectura"</span><br />    endtry<br />    <br />    <span style="color: #00C800;">if</span> lRs<br />        <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"BRW_GUIA"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Notas de Pedido"</span> <br /><br />        <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw                                    ;<br />         DATASOURCE oRs                                        ;<br />         COLUMNS <span style="color: #ff0000;">"FACBOL"</span>,<span style="color: #ff0000;">"FECHA"</span>,<span style="color: #ff0000;">"NUMERO"</span>,<span style="color: #ff0000;">"RAZSOC"</span>,<span style="color: #ff0000;">"MONEDA"</span>,    ;<br />                 <span style="color: #ff0000;">"TOTBRUTO"</span>,<span style="color: #ff0000;">"TOTDSCTO"</span>,<span style="color: #ff0000;">"TOTSUB"</span>,<span style="color: #ff0000;">"TOTIGV"</span>,<span style="color: #ff0000;">"TOTAL"</span> ;<br />          FIELDSIZES <span style="color: #000000;">30</span>,<span style="color: #000000;">68</span>,<span style="color: #000000;">54</span>,<span style="color: #000000;">200</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">85</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">60</span>,<span style="color: #000000;">85</span>              ;<br />          HEADERS                               ;<br />                 <span style="color: #ff0000;">"F/B"</span>                          ;<br />                ,<span style="color: #ff0000;">"FECHA"</span>                        ;<br />                ,<span style="color: #ff0000;">"NUMERO"</span>                       ;<br />                ,<span style="color: #ff0000;">"CLIENTE"</span>                      ;<br />                ,<span style="color: #ff0000;">"MON."</span>                         ;<br />                ,<span style="color: #ff0000;">"T.BRUTO"</span>                      ;<br />                ,<span style="color: #ff0000;">"T.DSCTO"</span>                      ;<br />                ,<span style="color: #ff0000;">"SUBTOT"</span>                       ;<br />                ,<span style="color: #ff0000;">"IGV"</span>                          ;<br />                ,<span style="color: #ff0000;">"TOTAL"</span>                        ;<br />          <span style="color: #0000ff;">ID</span> <span style="color: #000000;">4001</span> <span style="color: #0000ff;">OF</span> oDlg                       ;<br />          LINES CELL NOBORDER <span style="color: #0000ff;">UPDATE</span>            <br />          <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg<br />          <br />          oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">endif</span><br />   oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2yhvhald]
Accesar a las tablas tipo SQL
Aqui otra manera de conectarse [code=fw:3adw1fm0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">TRY</span><br />  oCnMsq:=toleauto<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;">"adodb.connection"</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />  MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha podido crear la conexión !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /><br />oCnMsq:<span style="color: #000000;">ConnectionString</span>:=<span style="color: #ff0000;">"Driver={SQL Server};"</span>+;<br />                        <span style="color: #ff0000;">"Server=SERVER;"</span>+;<br />                        <span style="color: #ff0000;">"Database=mydbase;"</span>+;<br />                        <span style="color: #ff0000;">"Uid=SA;"</span>+;<br />                        <span style="color: #ff0000;">"Pwd=miclave;"</span><br /><span style="color: #00C800;">TRY</span><br />  oCnMsq:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />  MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No pude abrir la conexión para crear las tablas !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /> </div>[/code:3adw1fm0]
Accesar a las tablas tipo SQL
[quote="leandro":2cs4m7lw]Aqui otra manera de conectarse [code=fw:2cs4m7lw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">TRY</span><br />  oCnMsq:=toleauto<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;">"adodb.connection"</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />  MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No se ha podido crear la conexión !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /><br />oCnMsq:<span style="color: #000000;">ConnectionString</span>:=<span style="color: #ff0000;">"Driver={SQL Server};"</span>+;<br />                        <span style="color: #ff0000;">"Server=SERVER;"</span>+;<br />                        <span style="color: #ff0000;">"Database=mydbase;"</span>+;<br />                        <span style="color: #ff0000;">"Uid=SA;"</span>+;<br />                        <span style="color: #ff0000;">"Pwd=miclave;"</span><br /><span style="color: #00C800;">TRY</span><br />  oCnMsq:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />CATCH oError<br />  MsgStop<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"No pude abrir la conexión para crear las tablas !"</span>, <span style="color: #ff0000;">"Error de datos"</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />END<br /> </div>[/code:2cs4m7lw][/quote:2cs4m7lw] Hola buenos dias gracias a ambos al Ing. Artu01 y al ing. Leandro por sus amables ejemplos, lo adaptare a mi necesidad y lograr conectarme. Saludos y buen dia! Atte: Adriano C. C.