Para acceder a bases de datos remotas usamos un webservice.
Aqui est谩 el c贸digo en PHP de un webservice muy simple que vamos a ir desarrollando:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36827&start=0
Este es el c贸digo a usar desde FiveTouch:
test.prg
#include "FiveTouch.ch"
function Main()
聽 聽local oHttp, cResponse
聽 聽oHttp := TIPClientHTTP():New( "http://www.fivetechsoft.com/webservice.php" )
聽 聽
聽 聽if ! oHttp:Open()
聽 聽 聽 ? "Error: oHttp:open(): " + oHttp:LastErrorMessage()
聽 聽 聽 RETURN
聽 聽endif
聽 聽if ! oHttp:Post( {=>} )
聽 聽 聽 ? "Error: oHttp:post(): " + oHttp:LastErrorMessage()
聽 聽endif
聽 聽cResponse 聽:= oHttp:ReadAll()
聽 聽oHttp:Close()
聽 聽MsgInfo( cResponse )
return nil
Ejecutando esta aplicaci贸n desde FiveTouch usando el emulador gratuito BlueStacks:
