HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Source code related resources

Moderator: Rathinagiri

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

HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by Rathinagiri » Thu Jul 08, 2010 3:41 pm

I am happy to share with you HMGSQL a 3-in-one library for connecting and manipulating MySQL, PostgreSQL and SQLite databases easily in HMG.

Download the following file and extract it in c:\hmg.
Follow the instructions in c:\hmg\hmgsql\doc\index.htm.

This is initial version. Please do give your comments and suggestions for improvement. Thanks Sudip for inducing me to create PostgreSQL bridge.
HMGSQL0.10.zip
(10.38 KiB) Downloaded 1094 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
luisvasquezcl
Posts: 1039
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 12 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Thu Jul 08, 2010 6:43 pm

Muchas gracias Rathi.
como siempre haciendo buenos aportes.
saludos cordiales,
luis vasquez

User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Post by raumi75 » Fri Jul 09, 2010 10:56 am

Thank you very much for writing this library and sharing it with us. As you can see it is already downloaded many times. Right now, I am using ODBC and slowly shifting to PGRDD, which lets me use the regular dbase syntax, which is more legible IMHO.

I am very interested in this development. Is your software also an RDD, or will it require to manipulate arrays filled with data? If I understand your Doc-file correctly, it is not an RDD.

Could you explain the advantage over RDDs? Please excuse me, if my question is too stupid. I have not done much playing around with your code.

Raumi

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

Post by Rathinagiri » Fri Jul 09, 2010 2:33 pm

Hi Raumi,

Thanks for your concern.

It is not RDD. It requires retrieval of data into arrays.

Advantage over RDDs?

Well, if you want to use only SQL queries for data manipulation, then it will be easy to use this library.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1444
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 4 times

Post by sudip » Fri Jul 09, 2010 4:03 pm

Great work, Rathi :D Thanks a lot :D
My dream is coming true. :D
I created libraries (after changing some files, as I am using hmg from e: drive). I shall test and send my feedback :D

After 5 minutes:
For my case, it will reduce the source code size, as I am using sql.prg (after some minor modifications) with all my projects.
With best regards,
Sudip

User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Post by raumi75 » Fri Jul 09, 2010 4:25 pm

Thank you for explaining. I also have some SQL-Queries in my code and will give it a try. If I understand you right, it will help my use the same SQL-Statements no matter if I use MySQL, PostgreSQL or SQLite.

I will let you know about my experience.

Raumi

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

Post by Rathinagiri » Fri Jul 09, 2010 4:36 pm

raumi75 wrote:Thank you for explaining. I also have some SQL-Queries in my code and will give it a try. If I understand you right, it will help my use the same SQL-Statements no matter if I use MySQL, PostgreSQL or SQLite.

I will let you know about my experience.

Raumi
Yep. That is it! But there are some package specific issues too! For example, in SQLite, you don't have IF() function inside SQL Query. However, there is a work-around method available for that.

Awaiting your experience.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

Post by claudiotedesco » Mon Jul 12, 2010 11:31 am

Hello Rathi.
Muy bueno tu aporte.
Estuve probando las lib este fin de semana y funcionan OK.
Quisiera saber si dichas LIB (HMGSQL 0.10) estaran disponibles en versiones nuevas de HMG o habran que instalarla?
Muchas Gracias y perdon por la traducción

Claudio


Hello Rathi.
Very good your contribution.
I tested the lib this weekend and work OK.
I wonder if the LIB (HMGSQL 0.10) will be available in new versions of HMG or have to be installed?
Thank you very much and sorry for the translation

Claudio

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

Post by Rathinagiri » Mon Jul 12, 2010 1:12 pm

Thanks for checking out Claudio.

I am happy that, it is helpful to somebody. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

NunoGouveia2014
Posts: 5
Joined: Wed Apr 02, 2014 11:45 am

Post by NunoGouveia2014 » Fri Apr 04, 2014 12:23 pm

Hi everyone

I'm still a "newbie" using this software. I was a clipper programmer back on the 90's but i'm been away long time!

Now I was searching for new kinda programming languages (without the need to pay to use the language), and I was happy to find out about this projects!

Well I found on the installation of HMG 3.2 a folder called HMGSQL .. i've read the document on the Doc Folder and then i came to this

3. Under c:\hmg\hmgsql\source directory run makehmgsql.bat. Three files namely libhmgmysql.a, libhmgpgsql.a, libhmgsqlite.a will be created in c:\hmg\lib directory. The corresponding library should be linked while compiling your program.

This has been done. and the files are on the c:\hmg\lib


4 (a). In HMG-IDE, select tools->preferences

(b). Add in additional libraries 'hmgmysql' or 'hmgpgsql' or 'hmgsqlite' as the case may be without quotes.


Well I open the IDE but i don't see the place to put the additional libraries .....

Only appears on my preferences of the IDE a place to put the code editor that is NOTEPAD++!

Can anybody help me on this?

Post Reply