Page 1 of 1
Postgres or MariaDb
Posted: Sun Mar 12, 2017 5:56 pm
by karweru
Dear Friends,
I have been using Sqlite for many years now. However, I have an urgent need to move to PostGres or MariaDb and is desperate for a step-by-step guidance of how to do it...a working sample i can compile from the IDE would really be useful.
I'm getting an error when i try the sample for postgres

- Untitled.png (8.9 KiB) Viewed 6552 times
I cant find examples for MariaDb
Kindly assist.
Re: Postgres or MariaDb
Posted: Sun Mar 12, 2017 6:21 pm
by dragancesu
I tried PostgreSQL and Oracle, with failed, mysql works great.
examples are \ hmgx.x.x \ Samples \ HCFL \ sql \ mysql
1.install mysql ( recommendation 5.5 or 5.6 )
2 In the program folder to copy libmysql.dll from mysql \ bin folder
3 to do compilation
MariaDB do not use, but it should be similar
Re: Postgres or MariaDb
Posted: Sun Mar 12, 2017 6:34 pm
by serge_girard
Hi Gilbert,
I work with MySQL/MariaDB and it works perfect.
Your postgres error-file do not show exact error message?
Serge
Re: Postgres or MariaDb
Posted: Sun Mar 12, 2017 7:13 pm
by karweru
Thank you Serge for your quick reply. The error I'm getting for postgress is;
Harbour 3.2.0dev (r1601151502)
Copyright (c) 1999-2015,
http://harbour-project.org/
C:\hmg.3.4.3\SAMPLES\HFCL\SQL\POSTGRESQL_1\demo.prg(85) Error E0030 Syntax error "syntax error at '.'"
C:\hmg.3.4.3\SAMPLES\HFCL\SQL\POSTGRESQL_1\demo.prg(91) Error E0030 Syntax error "syntax error at '.'"
2 errors
No code generated.
hbmk2[demo]: Error: Running Harbour compiler (embedded). 1
(C:\hmg.3.4.3\harbour\bin\harbour.exe) -n2 C:\hmg.3.4.3\SAMPLES\HFCL\SQL\POSTGRESQL_1\demo.prg -DHBMK_HAS_HMG32=1 -q -DHBMK_HAS_DEMO=1 -oC:\Users\gkarweru\AppData\Local\Temp\hbmk_1urbk2.dir\ -iC:\hmg.3.4.3\harbour\include -i. -iC:\hmg.3.4.3\include
I have also downloaded mariadb, will try the steps above. A quick question though,...does it mean one has to supply libmysql.dll to clients with the applications executable?
Re: Postgres or MariaDb
Posted: Mon Mar 13, 2017 2:45 am
by Rathinagiri
MariaDB is good and widely used.
Yes, we need libmysql.dll at runtime.
Re: Postgres or MariaDb
Posted: Mon Mar 13, 2017 7:30 am
by serge_girard
As Rathi said: libmysql.dll is indeed needed.
This could be a problem when you want to remote-distribute your application. I used to check with a small program which checks if it present. If not I copy it.
Serge
Re: Postgres or MariaDb
Posted: Mon Mar 13, 2017 8:18 am
by dragancesu
I do not know how many know MySQL,
I recommend to start the portable version, like
http://www.uniformserver.com/ZeroXI_doc ... guide.html
(new version include module MariaDB)
It is portable Web server but has more or can only be started MySQL which is enough and make a basic database administration and users
For MySQL to recommend databse manager
https://www.heidisql.com/
It's can be install or use portable
Hint for first use, start database, create user, then create database
Re: Postgres or MariaDb
Posted: Mon Mar 13, 2017 11:32 am
by karweru
Thanks everyone,
Is there away (or even an RDBMS) that one can connect to from a HMG application, as easily as with sqlite, without the need to supply libraries beside the executable? Sorry, too many questions

Re: Postgres or MariaDb
Posted: Mon Mar 13, 2017 11:52 am
by serge_girard