Page 28 of 29

HMG 3.3.1 (Stable)

Posted: Sat Jan 10, 2015 12:13 am
by Pablo César
Javier Tovar wrote:Si, me sucede también con los Demos que vienen en Samples.
Ahh te pasa tambien en los SAMPLES ? Muy raro a mi no me dá ese error.
P.D.:. Lo hice ahora con "BuildLib.Bat".
Y ? Cual fué el resultado ??

Re: HMG 3.3.1 (Stable)

Posted: Sat Jan 10, 2015 12:25 am
by Javier Tovar
Pablo César,

Me dio el mismo resultado!

Saludos

Re: HMG 3.3.1 (Stable)

Posted: Sat Jan 10, 2015 12:58 am
by Pablo César
Parece que es algo solo que ocurre contigo alli. Esperemos para ver si a alguien más e pasa lo mismo.

Re: HMG 3.3.1 (Stable)

Posted: Fri Jan 16, 2015 3:19 pm
by tonton2
srvet_claudio wrote:
tonton2 wrote:Bonjour,Hi
depuis le patch4 au patch6 il y a apparition de cette erreur lors de la sauvegarde comme indiqué sur l'image.

since the patch4 patch6 there appear this error when saving as showning in the image.
I fixed.
Bonsoir tout le monde,
j'ai remplacé le patch 6 par include et source de HMG 3.4.0 puis BuildAllLib et tout fonctionne de nouveau tres trés bien dans HMG 3.3.1.

Good evening everyone,
I replaced the patch 6 by INCLUDE and SOURCE of HMG 3.4.0 then re-compiling with BuildAllLib and everything works again very very well in HMG 3.3.1.

Re: HMG 3.3.1 (Stable)

Posted: Mon Jan 19, 2015 12:09 pm
by mol
I visited my client today. He is working with my app compiled with HMG 3.0.46.
I've installed new version compiled with HMG 3.3.1.
This new version is terribly slow compared to the old version. I must say source code of "slow section" is almost the same in both application version.
GRID and BROWSE loose their speed too much.
I want to point I'm not using UNICODE.
Now, I think about return to 3.0.46, or adapt old BROWSE code to new HMG. :-(

Re: HMG 3.3.1 (Stable)

Posted: Mon Jan 19, 2015 12:49 pm
by Rathinagiri
Have you used virtual Grid Marek?

Re: HMG 3.3.1 (Stable)

Posted: Mon Jan 19, 2015 1:11 pm
by mol
I looked through the old version code of BROWSE and it has only two changes in comparison to current version. Were the problem of speed can lay?

In my opinion, this slow down is caused by UNICODE.
So tell me - is it the way to use newest version in pure ANSI version, without unicode?
When I compile HMG selecting ANSI in abuilddlib.bat, infos in GRID are not readable. So, what's going on?

HMG 3.3.1 (Stable)

Posted: Tue Jul 14, 2015 12:47 pm
by Pablo César
Hi All,

In order to avoid runtime error when click on Save button of this current version of our Print Preview:
Screen1.png
Screen1.png (249.17 KiB) Viewed 6108 times
Please go to your C:\hmg.3.3.1\SOURCE\h_controlmisc.prg edit file, at Function _HMG_PRINTER_SavePages where is:

LOCAL cFullName, cPath, cName, cExt, cExtFile := ""

please change for:

LOCAL cFullName:="", cPath:="", cName:="", cExt:="", cExtFile := ""

Then you will need to rebuild libs by executing C:\hmg.3.3.1\BuildLib.bat.

Keeping update... :)

Re: HMG 3.3.1 (Stable)

Posted: Mon Oct 28, 2019 8:02 pm
by Ismach
Estimados de HMGForum:

He velto al ruedo y he instalado HMG344 y he intentado compilar el ejemplo demo que está en "C:\hmg\SAMPLES\HFCL\SQL\SQLITE", pero
al hacerlo me manda estos errores:

Code: Select all

hbmk2: Error: Función(es) referenciada, no encontrada, pero desconocida:
       CONNECT2DB(), SQL(), C2SQL(), MISCSQL()
he compilado todas las lib y me sigue saliendo este error...

Re: HMG 3.3.1 (Stable)

Posted: Tue Oct 29, 2019 6:26 am
by mol

Code: Select all

# include "minigui.ch"

FUNCTION connect2db(dbname,lCreate)
dbo := sqlite3_open(dbname,lCreate)
IF Empty( dbo )
   msginfo("Error in connection!")
   RETURN .f.
ENDIF
RETURN .t.


function sql(dbo1,qstr)
local table := {}
local currow := nil
local tablearr := {}
local rowarr := {}
local datetypearr := {}
local numtypearr := {}
local typesarr := {}
local current := ""
local i := 0
local j := 0
local type1 := ""
if empty(dbo1)
   msgstop("Database Connection Error!")
   return tablearr
endif
table := sqlite3_get_table(dbo1,qstr)
if sqlite3_errcode(dbo1) > 0 // error
   msgstop(sqlite3_errmsg(dbo1)+" Query is : "+qstr)
   return nil
endif 
stmt := sqlite3_prepare(dbo1,qstr)
IF ! Empty( stmt )
   for i := 1 to sqlite3_column_count( stmt )
      type1 := sqlite3_column_decltype( stmt,i)
      do case
         case type1 == "INTEGER" .or. type1 == "REAL" .or. type1 == "FLOAT"
            aadd(typesarr,"N")
         case type1 == "DATE"
            aadd(typesarr,"D")   
         otherwise
            aadd(typesarr,"C")
      endcase
   next i
endif
sqlite3_reset( stmt )
if len(table) > 1
   asize(tablearr,0)
   rowarr := table[2]
   for i := 2 to len(table)
      rowarr := table[i]
      for j := 1 to len(rowarr)
         do case
            case typesarr[j] == "D"
               cDate := substr(rowarr[j],1,4)+substr(rowarr[j],6,2)+substr(rowarr[j],9,2)
               rowarr[j] := stod(cDate)
            case typesarr[j] == "N"
               rowarr[j] := val(rowarr[j])
         endcase      
      next j
      aadd(tablearr,aclone(rowarr))
   next i
endif
return tablearr

function miscsql(dbo1,qstr)
if empty(dbo1)
   msgstop("Database Connection Error!")
   return .f.
endif
sqlite3_exec(dbo1,qstr)
if sqlite3_errcode(dbo1) > 0 // error
   msgstop(sqlite3_errmsg(dbo1)+" Query is : "+qstr)
   return .f.
endif 
return .t.

function MOL_sql(dbo1,qstr)
if empty(dbo1)
   msgstop("Database Connection Error!")
   return .f.
endif
sqlite3_exec(dbo1,qstr)
if sqlite3_errcode(dbo1) > 0 // error
   //msgstop(sqlite3_errmsg(dbo1)+" Query is : "+qstr)
   return .f.
endif 
return .t.

function C2SQL(Value)

   local cValue := ""
    local cFormatoDaData := set(4)
   do case
      case Valtype(Value) == "N"
         cValue := AllTrim(Str(Value))

      case Valtype(Value) == "D"
         if !Empty(Value)
            cdate := dtos(value)
            cValue := "'"+substr(cDate,1,4)+"-"+substr(cDate,5,2)+"-"+substr(cDate,7,2)+"'"
         else
            cValue := "''"
         endif

      case Valtype(Value) $ "CM"
         IF Empty( Value)
            cValue="''"
         ELSE
            cValue := "'" + value+ "'"
         ENDIF

      case Valtype(Value) == "L"
         cValue := AllTrim(Str(iif(Value == .F., 0, 1)))

      otherwise
         cValue := "''"       // NOTE: Here we lose values we cannot convert

   endcase

return cValue