HMG 3.0 (Forum Test VI)

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

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

HMG 3.0 (Forum Test VI)

Post by Roberto Lopez »

Hi All,
- HMG 3.0.0 (Forum Test VI) Changelog:

English:
--------

- Updated: Harbour compiler to 2.0 (Created from SVN 2009.10.14).
HMG IDE 2.9.4 and earlier versions ARE NOT COMPATIBLE with this
HMG version.

- Updated: MingW compiler to 4.4.1

- Modified: Samples.

Removed: ADORDD samples (adordd not working on
current Harbour release)

Added:

-\HMG\SAMPLES\RDD.SQL\MYSQL
-\HMG\SAMPLES\RDD.SQL\ODBC
-\HMG\SAMPLES\RDD.SQL\ARRAY
-\HMG\SAMPLES\MEMORY.TABLES
-\HMG\SAMPLES\MULTI.WIN
-\HMG\SAMPLES\SQLITE
-\HMG\SAMPLES\POSTGRESQL

Modified:

-\HMG\SAMPLES\MULTI.PRG

New: 'Build.bat' (it replaces 'compile.bat').

Build [/i|/r|/d|/cs|/ci/cr] <PrgFile> | <filelist.hbp> [config.hbc]

[/i] : incremental build
[/r] : incremental build (rebuild all)

[/cs] : Console/mixed mode (std build)
[/ci] : Console/mixed mode (incremental build)
[/cr] : Console/mixed mode (incremental rebuild all)

[/d] : Debug mode (gui and console)

<filelist.hbm> : A text file with .hbp extension containing a source list
<configfile.hbc>: A text file with configuration parameters as additional
libs, include paths and lib paths.

<configfile.hbc> Syntax:

incpaths = incpath1 incpath2 ... incpathn

libpaths = libpath1 libpath2 ... libpathn

libs = lib1 lib2 ... libn

- library names must not include 'lib' prefix nor '.a' extension.

- 'build.bat' will create an 'error.log' file in the app folder when build
process ends with an error condition.

Sample: \HMG\SAMPLES\MULTI.PRG


Español:
--------

- Actualizado: Harbour compiler a 2.0 (SVN 2009.10.12)
HMG-IDE versión 2.9.4 y anteriores no es compatible con esta versión
de HMG.

- Actualizado: MingW compiler a 4.4.1

- Modificado: Samples.

Eliminado: Ejemplos ADORDD (adordd no funciona en la
versión actual de Harbour)

Agregados:

-\HMG\SAMPLES\RDD.SQL\MYSQL
-\HMG\SAMPLES\RDD.SQL\ODBC
-\HMG\SAMPLES\RDD.SQL\ARRAY
-\HMG\SAMPLES\MEMORY.TABLES
-\HMG\SAMPLES\MULTI.WIN
-\HMG\SAMPLES\SQLITE
-\HMG\SAMPLES\POSTGRESQL

Modificado:

-\HMG\SAMPLES\MULTI.PRG

Nuevo:'Build.bat' (reemplaza a 'compile.bat').

Build [/i|/r|/d|/cs|/ci/cr] <PrgFile> | <filelist.hbp> [config.hbc]

[/i] : incremental build
[/r] : incremental build (rebuild all)

[/cs] : Console/mixed mode (std build)
[/ci] : Console/mixed mode (incremental build)
[/cr] : Console/mixed mode (incremental rebuild all)

[/d] : Debug mode (gui and console)


<filelist.hbp> : Un archivo de texto con la lista de programas del proyecto.
<configfile.hbc>: Un archivo de texto con información de configuración
(librerías adicionales y paths de include y librerías adicionales).

<configfile.hbc> Syntax:

incpaths = incpath1 incpath2 ... incpathn

libpaths = libpath1 libpath2 ... libpathn

libs = lib1 lib2 ... libn

- Los nombres de librería no deben incluir el prefijo 'lib' ni la
extensión '.a'

- 'build.bat' creará un archivo llamado 'error.log' en la carpeta de la
aplicaci'ón cuando el proceso de compilación falle.


Ejemplo: \HMG\SAMPLES\MULTI.PRG

Well... I guess that I'll should call 3.0 as 'Sudip Release', because various of the new features (and samples) comes from his requests :)

Download/descargas:hmg300_Test_06.exe

Enjoy!

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: HMG 3.0 (Forum Test VI)

Post by Vanguarda »

Thanks Master,

With best Regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0 (Forum Test VI)

Post by Rathinagiri »

-\HMG\SAMPLES\POSTGRESQL?

OMG! Thanks Roberto. It's gr8!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.0 (Forum Test VI)

Post by esgici »

Thanks a lot Maestro and Sudip :D

Best Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
gfilatov
Posts: 1067
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 3.0 (Forum Test VI)

Post by gfilatov »

Hi Roberto,

Thanks for your efforts :!:

Please be so kind to update a sample.prg at the folder hmg\samples\sqlite with code below:

Code: Select all

* SQLITE Sample by Rathinagiri / MOL / Sudip (HMG Forum)

#include "minigui.ch"

function main
local aTable := {}
local aCurRow := {}
public dbo := nil
public cDBName := "sample.db3"

set century on
set date ital

if .not. file(cDBName)
   create_populate()
else
   connect2db(cDBName)   
endif   

define window sample at 0,0 width 800 height 700 main

define grid table
   row 10
   col 10
   width 780
   height 500
   widths {200,100,100,100,50,200}
   headers {"Text","Number","Floating","Date1","Logic","Text2"}
end grid

define button P_ViewRecord
	row 600 
	col 100
	width 140
	height 24
	caption "View record = Giri11"
	action ViewRecord()
end button

define button P_ChangeRecord
	row 600 
	col 300
	width 140
	height 24
	caption "Popraw"
	action ChangeRecord()
end button

end window
RefreshTable()
sample.center
sample.activate
return NIL

function RefreshTable

	sample.table.DeleteAllItems()
	
	aTable := sql(dbo,"select * from new where date1 <= "+c2sql(ctod("15-04-2010")))
	for i := 1 to len(aTable)
		aCurRow := aTable[i]
		sample.table.additem({aCurRow[1],str(aCurRow[2]),str(aCurRow[3]),dtoc(aCurRow[4]),iif(aCurRow[5]==1,"True","False"),aCurRow[6]})
	next i
	if sample.table.itemcount > 0
		sample.table.value := 1
	endif
	sample.table.Refresh
return nil   


function create_populate()
local cCreateSQL := "CREATE TABLE new (text VARCHAR(50), number INTEGER PRIMARY KEY AUTOINCREMENT, floating FLOAT, date1 DATE, logic INTEGER, text2  VARCHAR(40))"
local cCreateIndex := "CREATE UNIQUE INDEX unique1 ON new (text,text2)"


if .not. connect2db(cDBName,.t.)
   return nil
endif

if .not. miscsql(dbo,cCreateSQL)
   return nil
endif

if .not. miscsql(dbo,cCreateIndex)
   return nil
endif

for i := 1 to 100
   
cQStr := "insert into new (text,floating,date1,logic,text2) values ("+;
          c2sql("Giri"+alltrim(str(i)))+","+;
          c2sql(123.45)+","+;
          iif(i <= 50,c2sql(date()),c2sql(ctod("18-09-2010")))+","+;
          c2sql(.t.)+","+;
          c2sql("India")+;
          ")"
if .not. miscsql(dbo,cQstr)
   return nil
endif
          
next i

msginfo("Insert Queries Completed!")
          
return nil


function ViewRecord
	local aResult
	
	aResult := sql(dbo, 'Select text2 from new where text = "Giri11"') // for update')
	if !empty(aResult)
		msgbox("Result is: " + aResult[1,1])
	endif
 return
 
function ChangeRecord
	local aTemp := {space(40)}
	
	aTemp := InputWindow("Put your value for TEXT2", {"New value:"}, {space(40)}, {40})
	if aTemp[1] != Nil // changed here
		cQstr := "update new set text2= '" +aTemp[1] +"' where text='Giri11'"
	    if !miscsql(dbo,cQstr)
			msginfo("Error during writing!")
		else
			msgbox("TEXT2 saved OK")
			RefreshTable()
		endif
	endif
return
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0 (Forum Test VI)

Post by Roberto Lopez »

rathinagiri wrote:-\HMG\SAMPLES\POSTGRESQL?

OMG! Thanks Roberto. It's gr8!
Sometimes, I remain silent, but I read messages and think about them :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0 (Forum Test VI)

Post by Roberto Lopez »

gfilatov wrote:Hi Roberto,

Thanks for your efforts :!:

Please be so kind to update a sample.prg at the folder hmg\samples\sqlite with code below:
<...>
Thanks! I'll replace the file.

What you exactly changed and which is the reason? (I'm lazy today to check myself :) )

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
gfilatov
Posts: 1067
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 3.0 (Forum Test VI)

Post by gfilatov »

Roberto Lopez wrote:
gfilatov wrote:Hi Roberto,

Thanks for your efforts :!:

Please be so kind to update a sample.prg at the folder hmg\samples\sqlite with code below:
<...>
Thanks! I'll replace the file.

What you exactly changed and which is the reason? (I'm lazy today to check myself :) )
Roberto,

I've got the following two replaces: :arrow:

1) wrong text in sql query 'for update' provokes the error message (look at below)
function ViewRecord
local aResult

aResult := sql(dbo, 'Select text2 from new where text = "Giri11"') // for update')
if !empty(aResult)
msgbox("Result is: " + aResult[1,1])
endif
return
2) correction for checking of return of function InputWindow (we have error at selection the 'Cancel' button)
aTemp := InputWindow("Put your value for TEXT2", {"New value:"}, {space(40)}, {40})
if aTemp[1] != Nil // changed here
That's all :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0 (Forum Test VI)

Post by Roberto Lopez »

gfilatov wrote:
Roberto Lopez wrote:
gfilatov wrote:Hi Roberto,

Thanks for your efforts :!:

Please be so kind to update a sample.prg at the folder hmg\samples\sqlite with code below:
<...>
Thanks! I'll replace the file.

What you exactly changed and which is the reason? (I'm lazy today to check myself :) )
Roberto,

I've got the following two replaces: :arrow:

1) wrong text in sql query 'for update' provokes the error message (look at below)
function ViewRecord
local aResult

aResult := sql(dbo, 'Select text2 from new where text = "Giri11"') // for update')
if !empty(aResult)
msgbox("Result is: " + aResult[1,1])
endif
return
2) correction for checking of return of function InputWindow (we have error at selection the 'Cancel' button)
aTemp := InputWindow("Put your value for TEXT2", {"New value:"}, {space(40)}, {40})
if aTemp[1] != Nil // changed here
That's all :idea:
Many thanks for the explanation.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0 (Forum Test VI)

Post by Roberto Lopez »

rathinagiri wrote:-\HMG\SAMPLES\POSTGRESQL?

OMG! Thanks Roberto. It's gr8!
And... I guess that when SUdip and you tried to import the dll missed 'pexports'.

An adequate batch for import the dll is:
set path=c:\mingw\bin
pexports libpq.dll > libpq.def
dlltool --input-def libpq.def --dllname libpq.dll --output-lib libpq.a -k
copy libpq.a c:\hmg\harbour\lib
Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply