Page 1 of 1
storing mod_harbour views on memo fields
Posted: Sun Jul 21, 2019 5:34 pm
by Antonio Linares
Re: storing mod_harbour views on memo fields
Posted: Sun Jul 21, 2019 6:34 pm
by Antonio Linares
Re: storing mod_harbour views on memo fields
Posted: Sun Jul 21, 2019 6:34 pm
by Antonio Linares
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 5:18 am
by Antonio Linares
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 1:38 pm
by Otto
Dear Antonio,
I made a test on view: number 14
https://harbour.fourtech.es/modharbour_ ... ws:exec:14
Code execution is working fine.
Can you please explain how we get post data into harbour variables?
I remember when I was using ASP that there were several way.s How do you suggest to do it.
Would you be so kind to post a sample how to get and send mod_harbour variables to javascript.
Thank you so much
Otto
@Sergey, I have used submitting form here with POST method, i don't know why it doesn't work. Do you know why? And how to solve that? – Jiangong SUN Dec 17 '09 at 10:14
@sergey, so i need to use ajax? Actually, i'm familliar with that. – Jiangong SUN Dec 18 '09 at 10:08
Actually, I have used your method in the past one level select box. But now i have made a three-chained select box, so i can't use your method. – Jiangong SUN Dec 18 '09 at 10:17
At this point: Yes, you need to use AJAX technology. If you have troubles with realization, I think I can help. – Sergey Kuznetsov Dec 18 '09 at 17:50
2
@MadaraUchiha The OP already used mysql_ functions; it wouldn't be the goal of answering this question with a complete rewrite. – Ja͢ck Oct 17 '12 at 4:14
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 3:08 pm
by Antonio Linares
Dear Otto,
Your example is working fine:
{"title"=>"07%2F10%2F2019", "Abreise"=>"07%2F19%2F2019", "zimmer_quantity"=>"1", "zimmer%5Berwachsene%5D%5B%5D"=>"1", "zimmer%5Bkinder%5D%5B%5D"=>"1"}
The only thing I noticed is that you are calling a non secure site:
(SSL is invalid)
https://my3zinnen.com/booking_tests/postpairs.prg
Probably is because you are jumping from our server into your server. Run everything on your server.
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 3:16 pm
by Antonio Linares
Dear Otto,
To save the posted data you do this:
Code: Select all
function Main()
local hPairs := AP_PostPairs()
USE (your DBF) SHARED NEW
APPEND BLANK
if RLock()
FieldPut( FieldPos( "title" ), hb_UrlDecode( hPairs[ "title" ] ) )
FieldPut( FieldPos( "Abreise" ), hb_UrlDecode( hPairs[ "Abreise" ] ) )
FieldPut( FieldPos( "zimmer_quantity" ), hb_UrlDecode( hPairs[ "zimmer_quantity" ] ) )
FieldPut( FieldPos( hb_UrlDecode( "zimmer%5Berwachsene%5D%5B%5D" ) ), hb_UrlDecode( hPairs[ "zimmer%5Berwachsene%5D%5B%5D" ] ) )
FieldPut( FieldPos( hb_UrlDecode( "zimmer%5Bkinder%5D%5B%5D" ) ), hb_UrlDecode( hPairs[ "zimmer%5Bkinder%5D%5B%5D" ] ) )
DbUnLock()
endif
USE
return nil
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 4:22 pm
by Otto
Dear Antonio,
thank you.
Would you be so kind to show me the code how to read the database and to show it on the form.
OT: is there a way to know if I only have the files
mod_harbour.so
libharbour.dll
if these are the 32 bit or 64 bit files.
Thank you in advance
Otto
Re: storing mod_harbour views on memo fields
Posted: Mon Jul 22, 2019 7:07 pm
by Antonio Linares
Otto,
In mod_harbour/samples/genesis/index.prg please review function BuildEdit() source code
https://github.com/FiveTechSoft/mod_har ... /index.prg
1. Go to the folder where the DLL is
2. run "bash" from a cmd window from that folder
3. "file mod_harbour.so" will tell you if it is 32 or 64
4. same for libharbour.dll
Re: storing mod_harbour views on memo fields
Posted: Wed Jul 24, 2019 7:54 am
by Massimo Linossi
Hello Antonio.
I've tested the genesis from the first link and works perfectly.
Then I downloaded all the genesis folder from GitHub and placed inside the samples on my local machine.
When starts and I put the login informations I have this error :
Code: Select all
error: Open error
called from: GETERRORINFO, line: 106
called from: DOBREAK, line: 117
called from: (b)MAIN, line: 23
called from: DBUSEAREA, line: 0
called from: IDENTIFY, line: 299
called from: LOGIN, line: 256
called from: CONTROLLER, line: 124
called from: MAIN, line: 10
called from: HB_HRBDO, line: 0
called from: EXECUTE, line: 84
called from: MAIN, line: 34
The index.prg on your server and the one on GitHub are different ?
Re: storing mod_harbour views on memo fields
Posted: Wed Jul 24, 2019 10:32 am
by Antonio Linares
Massimo,
If you install Apache on the Windows 10 bash (linux) then you have to give the right permits to the data folder this way:
cd /home/$USER/mod_harbour/samples/genesis
sudo chown -R www-data:www-data data
With this, the DBFs will open properly