USE http://.......

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

USE http://.......

Post by fchirico »

Español:

Una pregunta:

Se puede de alguna manera hacer algo como esto?

USE http://pepe.com.ar

Yo necesito es acceder a una DBF que se encuentra en una carpeta publicada en internet.


Saludo, Fernando Chirico.

English:

One question:

You can somehow do something like this?

USE http://pepe.com.ar

I need to access a DBF is that it is in a public folder on the internet.


Regards, Fernando Chirico.
Saludos, Fernando Chirico.
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: USE http://.......

Post by Rathinagiri »

IMHO it is not possible directly. However, we can use oHTTP object to create a temporary dbf file from the internet folder.

I had uploaded for you a test dbf and dbt file. Urls are http://www.rathinagiri.in/TEST.DBF & http://www.rathinagiri.in/TEST.DBT

Try this.

Code: Select all

LOCAL oHttp, cHtml, hQuery, aLink, oNode, oDoc, cUrl, cFile
// temp.dbf
cFile := "temp.dbf"
cUrl := "http://www.rathinagiri.in/TEST.DBF"
oUrl := tURL():New(cUrl)
oHttp:= TIpClientHttp():new( oUrl )
IF .NOT. oHttp:open()
   msgstop("Connection error:", oHttp:lastErrorMessage())
   return nil
ENDIF
IF oHttp:ReadToFile( cFile )
   msginfo("File "+ cFile + " written.")
endif
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: USE http://.......

Post by fchirico »

rathinagiri wrote:IMHO it is not possible directly. However, we can use oHTTP object to create a temporary dbf file from the internet folder.

I had uploaded for you a test dbf and dbt file. Urls are http://www.rathinagiri.in/TEST.DBF & http://www.rathinagiri.in/TEST.DBT

Try this.

Code: Select all

LOCAL oHttp, cHtml, hQuery, aLink, oNode, oDoc, cUrl, cFile
// temp.dbf
cFile := "temp.dbf"
cUrl := "http://www.rathinagiri.in/TEST.DBF"
oUrl := tURL():New(cUrl)
oHttp:= TIpClientHttp():new( oUrl )
IF .NOT. oHttp:open()
   msgstop("Connection error:", oHttp:lastErrorMessage())
   return nil
ENDIF
IF oHttp:ReadToFile( cFile )
   msginfo("File "+ cFile + " written.")
endif
Thank you!

* What library need to compile?
* If I need job in a Shared Mode, how can i open DBF file?

Regards and tahnk you, Fernando Chirico.
Saludos, Fernando Chirico.
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: USE http://.......

Post by Rathinagiri »

- No separate library is required. Official HMG libraries are enough. I think it is in socket library.
- Since the temp dbf file is a disk file, it can be shared like any other dbf file.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: USE http://.......

Post by fchirico »

rathinagiri wrote:- No separate library is required. Official HMG libraries are enough. I think it is in socket library.
- Since the temp dbf file is a disk file, it can be shared like any other dbf file.
rathinagiri, thanks for everytihng.

But my questions is if i can open in shared mode:

Example, USE temp SHARED

How can i do it with "oHttp:open()"?

Regards, Fernando Chirico.
Saludos, Fernando Chirico.
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: USE http://.......

Post by Vanguarda »

fchirico wrote: But my questions is if i can open in shared mode:
Example, USE temp SHARED
Hi friends,
Fernando, why don´t try with LetoDB?!
I think that would be more easy if you wanna share the database in real time.

with best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Re: USE http://.......

Post by fchirico »

Vanguarda wrote:
fchirico wrote: But my questions is if i can open in shared mode:
Example, USE temp SHARED
Hi friends,
Fernando, why don´t try with LetoDB?!
I think that would be more easy if you wanna share the database in real time.

with best regards,

Of course.
That was the other possibility. But I always try to avoid libraries.

Thank you!

Regards, Fernando Chirico
Saludos, Fernando Chirico.
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: USE http://.......

Post by Vanguarda »

fchirico wrote: That was the other possibility. But I always try to avoid libraries.
Understood! :)

regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
ClaudioGalera
Posts: 47
Joined: Tue Jul 14, 2009 1:14 pm
Location: Mar del Plata, Argentina

Re: USE http://.......

Post by ClaudioGalera »

Hola a Todos :)
Opino que el problema no esta del lado del cliente, sino del lado del servidor, y por lo tanto lo que necesitamos es algo (un servidor) que nos provea el acceso a los registros de la base de datos, por eso opino lo mismo que Vanguarda, Letodb es una muy buena opcion.
Otra opcion es usar PHP para que lea el dbf y utilizar alguna rutina que nos lea la respuesta del servidor que contendra el registro que necesitamos.
Saludos
Claudio

Google Translate

Hello All :)
I believe the problem is not client side but server side, and therefore we need something (a server) that give us access to records in the database, so I feel like Vanguarda, Letodb is a very good option.
Another option is to use PHP to read the dbf and use a routine that we read the response from the server that contains the record you need.
Greetings
Claudio
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: USE http://.......

Post by swapan »

INTERESTING THREAD.................................
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
Post Reply