Save and restore arrays

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 1018
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 167 times
Been thanked: 284 times

Re: Save and restore arrays

Post by AUGE_OHR »

hi,

ok, understand.

have made a Sample with FieldWideStatic and Show()/Hide() Form with Checkbox "when running" how it can be used
FieldWideStatic.ZIP
(1.3 KiB) Downloaded 34 times
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 1018
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 167 times
Been thanked: 284 times

Post by AUGE_OHR »

RPC wrote:
Fri Feb 14, 2020 2:44 pm
Perhaps you can also help with "save" bitmap image problem I have mentioned above.
try other Bitmap ... something does not work but my Bitmap (16x16) work as Resource
Bad_BMP.jpg
Bad_BMP.jpg (14.09 KiB) Viewed 673 times
have fun
Jimmy

RPC
Posts: 217
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 99 times
Been thanked: 12 times

Post by RPC »

Hi Jimmy
Your program works till we are in the program when we leave the program and run it again it does not maintain the same state of check boxes.
The state is in fact not saved(to disk for restoration later) in your program.
Thanks though for your efforts.

RPC
Posts: 217
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 99 times
Been thanked: 12 times

Post by RPC »

AUGE_OHR wrote:
Fri Feb 14, 2020 3:45 pm
try other Bitmap ... something does not work but my Bitmap (16x16) work as Resource
This works. I changed my bitmap image size to 16x16 and now it shows on the button
Thanks for the help.

edk
Posts: 586
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 148 times
Been thanked: 515 times

Post by edk »

Hi RPC.
Recently, I worked on something similar, except that I needed to be able to set 27 checkboxes for each record. I didn't want to do 27 fields for each record, so I was looking for a solution to "encode" them in one field. Since I don't expect more checkboxes than 32, I used a 32-bit number to encode their state, which I then encoded into a binary string. And so to encode 32 checkboxes, a string of 4 characters is enough.

My sample:
GRID_25.7z
(3.07 KiB) Downloaded 51 times
To edit checkboxes just press Enter or doubleclick on ">> Show <<" fields.

Edward.

RPC
Posts: 217
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 99 times
Been thanked: 12 times

Post by RPC »

Hi Edward
Thanks for your reply.
Sorry I got busy with my work and did not check the forum earlier so could not reply.
My program uses about 50 check boxes but not any tables(dbfs) so my requirement was much simple. Any way I have learnt something new from your demo. I will keep it in mind and use it future whenever required.

I was about to PM about something you guided and helped me immensely.

If you remember you helped me in downloading files from the net by providing necessary code for http and oSoap. I am very much thankful to you for that.

But now I am stuck with another problem. I need to download an old file from net. I can download the file when enter/paste the address in the browser but get error no 403 forbidden when I try to download it through program you have provided. I am enclosing the program. I can download files from 1 jan 2016 on wards but not prior to that for eg 19 feb 2015.

Please have a look.

Many thanks
Attachments
testunzip.zip
(1.9 KiB) Downloaded 31 times
Last edited by RPC on Wed Feb 19, 2020 6:13 pm, edited 1 time in total.

edk
Posts: 586
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 148 times
Been thanked: 515 times

Post by edk »

Hi. I don't promise, but I will try to look at your problem by the end of the week.

RPC
Posts: 217
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 99 times
Been thanked: 12 times

Post by RPC »

edk wrote:
Wed Feb 19, 2020 2:20 pm
Hi. I don't promise, but I will try to look at your problem by the end of the week.
Hi Edward
Please take your time.
I will wait.
Many thanks

edk
Posts: 586
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 148 times
Been thanked: 515 times

Post by edk »

RPC wrote:
Wed Feb 19, 2020 11:41 am
But now I am stuck with another problem. I need to download an old file from net. I can download the file when enter/paste the address in the browser but get error no 403 forbidden when I try to download it through program you have provided. I am enclosing the program. I can download files from 1 jan 2016 on wards but not prior to that for eg 19 feb 2015.

Please have a look.

Many thanks
Hi RPC.
I checked quickly, but the link you generate also doesn't have access to the page from a web browser. Check the correctness of the links before 01/01/2016.
Link generated by your app: https://www1.nseindia.com/content/histo ... av.csv.zip
Bez tytułu.png
Bez tytułu.png (20.55 KiB) Viewed 468 times

RPC
Posts: 217
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 99 times
Been thanked: 12 times

Post by RPC »

Hi Edward
You are right. I am getting the same message for 17 dec 2015. But I can download for 19 feb 2015 :?
Further when I download from the website at
https://www1.nseindia.com/products/cont ... eve_eq.htm
with Select Report as "Bhavcopy"
Date 17-12-2015
it downloads(in two formats csv and dbf) and provides links, when I hover over the link I can see the download link as
https://www1.nseindia.com/content/histo ... av.csv.zip
when I click the link the file downloads but again when I copy paste the link in browser I get the same message of Access denied.

In fact I can download this way from 3 nov 1994 on wards.

Please check
Thanks
Attachments
Dnld17-12-2015.png
Dnld17-12-2015.png (355.05 KiB) Viewed 460 times

Post Reply