storing mod_harbour views on memo fields

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

storing mod_harbour views on memo fields

Post by Antonio Linares »

Wow... :-)

First you have to identify...

https://harbour.fourtech.es/modharbour_ ... ews:exec:4

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post by Antonio Linares »

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: storing mod_harbour views on memo fields

Post 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

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: storing mod_harbour views on memo fields

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: storing mod_harbour views on memo fields

Post 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 ?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: storing mod_harbour views on memo fields

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply