What JMG has to do with HMG?

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 4012
Joined: Wed Jul 30, 2008 6:43 pm

What JMG has to do with HMG?

Post by Roberto Lopez »

Hi All,

Yesterday I've started to think, if is right, writing about JMG here.

In fact, JMG does not uses Harbour at all, and is not related with HMG in any way.

So... what I'm doing here?

Well... maybe JMG has nothing in common with HMG, but they could work together to do things that HMG can't.

HBTIP is the Harbour contrib that can do the trick:

You could use the same php scripts located on a server that JMG uses, from HMG too. ie:

Code: Select all

	cGet :=  cWebAddress + '/script/getdata.php'

	cGet += '?'

	cGet += 'code='	+ alltrim ( lower(main.code.value) )

	// to add more parameters, you must add an '&' between them

	oHttp:= TIpClientHttp():new( cGet )

	IF .NOT. oHttp:open()
		MsgStop ( "Connection not available!" )
		oHttp:close()
		Return
	EndIf

	cData   := oHttp:readAll()

	MSGINFO('Data returned from server: ' + cData)

	oHttp:close()

This way, you could have your MySql database on a web (or LAN) server, and work with it from HMG (for Windows desktop clients) and JMG (for mobile clients).

There is other possible schemes to achieve that, ie, you could access MySql data directly from HMG without using the PHP scripts that JMG uses, but, this way, you should code the database handling code twice.

Wel... finally JMG and HMG could be friends... who knows :)
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
srvet_claudio
Posts: 2220
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: What JMG has to do with HMG?

Post by srvet_claudio »

Roberto Lopez wrote: Wel... finally JMG and HMG could be friends... who knows :)
This is great !
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply