Postgres or MariaDb

Moderator: Rathinagiri

Post Reply
User avatar
karweru
Posts: 150
Joined: Fri Aug 01, 2008 1:51 pm
Contact:

Postgres or MariaDb

Post by karweru » Sun Mar 12, 2017 5:56 pm

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
Untitled.png (8.9 KiB) Viewed 816 times
I cant find examples for MariaDb

Kindly assist.
Kind regards,
Gilbert.

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Sun Mar 12, 2017 6:21 pm

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

User avatar
serge_girard
Posts: 1871
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 293 times
Been thanked: 67 times
Contact:

Post by serge_girard » Sun Mar 12, 2017 6:34 pm

Hi Gilbert,

I work with MySQL/MariaDB and it works perfect.
Your postgres error-file do not show exact error message?

Serge

User avatar
karweru
Posts: 150
Joined: Fri Aug 01, 2008 1:51 pm
Contact:

Post by karweru » Sun Mar 12, 2017 7:13 pm

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?
Kind regards,
Gilbert.

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Mon Mar 13, 2017 2:45 am

MariaDB is good and widely used.

Yes, we need libmysql.dll at runtime.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
serge_girard
Posts: 1871
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 293 times
Been thanked: 67 times
Contact:

Post by serge_girard » Mon Mar 13, 2017 7:30 am

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

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Mon Mar 13, 2017 8:18 am

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

User avatar
karweru
Posts: 150
Joined: Fri Aug 01, 2008 1:51 pm
Contact:

Post by karweru » Mon Mar 13, 2017 11:32 am

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 :(
Kind regards,
Gilbert.

User avatar
serge_girard
Posts: 1871
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 293 times
Been thanked: 67 times
Contact:

Post by serge_girard » Mon Mar 13, 2017 11:52 am


Post Reply