Page 8 of 20

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 4:52 am
by bpd2000
srvet_claudio wrote: Not work for me in Win XP SP3 32-bit
Win XP SP3 32-bit, hmg.3.4.1 [after 2 patch] Unicode version, Run ok

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 5:29 am
by mol
Roberto Lopez wrote:
srvet_claudio wrote: this is not an elegant solution, but ...

File: main_query_server_action.prg

Code: Select all


#include "hmg.ch"

declare window Main

Function main_query_server_action

   aRecordset := netio_funcexec( "query_001" , Main.Query_String.Value )

Main.Grid_1.DeleteAllItems   // <-----------------------------------------------------  add this line

   Main.Grid_1.ItemCount := LEN(aRecordset)

Return Nil
Sadly, the problem remains.

My test is as follows:

First query: A (it is Ok)

Second query: B (does not work.) Grabage showns.

Don't worry about this, I'll create an alternate demo, using a standard grid, filling it with additem.

My first attempt was virtual grid, because, it could work very fast even with very large recordsets (NETIO compresses data, so, the recordest size is not a concern).

An important thing to note, is that the problem is not NETIO related, since, the GRID_03 demo is failing the same way here. It starts ok, but when start to move the vertical scroll bar the content of first column become 'X's.

OS: XP SP3 32
I had such a problem, when I compiled hmg with ANSI selection (besides, I'm still using ANSI).
Everything looks OK when compiled as UNICODE and used as ANSI.

Strange, but it works!

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 11:00 am
by dhaine_adp
mol wrote: I had such a problem, when I compiled hmg with ANSI selection (besides, I'm still using ANSI).
Everything looks OK when compiled as UNICODE and used as ANSI.

Strange, but it works!
Hello Marek and all,

Does it have something to do with the buildlib.bat? When you use the batch file it will always build Unicode library because of this line:
"if %ERRORLEVEL% NEQ 0 goto OP2 ". For me, I've put a remarks symbol in front of it as shown below. Even if you select ANSI the compiled libraries will come out as UNICODE. Please check yours.

Code: Select all

echo. Build HMG Library to support the character set:
echo. -----------------------------------------------
echo.
echo. 1 - ANSI
echo. 
echo. 2 - UNICODE
echo. 
echo. 0 - Cancel
echo. 
echo.
echo. 
set /p option=Select an Option [0, 1, 2] (for default: UNICODE): 
'if %ERRORLEVEL% NEQ 0 goto OP2 
if %option% == 1 goto OP1  
if %option% == 2 goto OP2
if %option% == 0 exit
goto MENU

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 12:21 pm
by Roberto Lopez
srvet_claudio wrote: Very interesting, I did the same steps that you and both demos works fine for me (Win7 SP1 64-bit)
I've forgot to mention that I'm using ANSI 32 bits version, so the complete test set is:

OS: XP SP3 32 BITS
HMG: 32 BITS ANSI

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 12:45 pm
by Rathinagiri
Roberto, is my idea working for you?

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 5:36 pm
by srvet_claudio
Hi Friends,
please test if this proposal solution by Rathi work for you?
Rathinagiri wrote:IMHO, you have to reset the size of the virtual grid to 0 before doing any operation.

Kindly check up this:

Code: Select all


#include "hmg.ch"

declare window Main

Function main_query_server_action

Main.Grid_1.ItemCount := 0    // <-----------------------------------------------------  add this line
   
   Main.Grid_1.disableupdate()

   aRecordset := netio_funcexec( "query_001" , Main.Query_String.Value )

Main.Grid_1.DeleteAllItems   // <-----------------------------------------------------  add this line

   Main.Grid_1.ItemCount := LEN(aRecordset)

   Main.Grid_1.enableupdate()

Return Nil

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 6:36 pm
by Roberto Lopez
Rathi, Claudio,

It still not working for me, with the latest suggestions.

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 9:21 pm
by Roberto Lopez
Claudio,

I've rebuilt the apps, with unicode version and it works fine now. So, the problem is limited to ANSI version.

Thanks for your help.

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 9:38 pm
by mol
As I wrote....
Something is wrong with ANSI compilation

Re: HMG 3.4.1

Posted: Fri Jul 10, 2015 11:09 pm
by srvet_claudio
Roberto Lopez wrote:Claudio,

I've rebuilt the apps, with unicode version and it works fine now. So, the problem is limited to ANSI version.

Thanks for your help.
mol wrote:As I wrote....
Something is wrong with ANSI compilation
Marek and Roberto,
you are right, the problem is in ANSI, I will have to revise the code.