HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Source code related resources

Moderator: Rathinagiri

User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by Rathinagiri »

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 1499 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by luisvasquezcl »

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:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by raumi75 »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by Rathinagiri »

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: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by sudip »

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:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by raumi75 »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by Rathinagiri »

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

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by claudiotedesco »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by Rathinagiri »

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

Re: HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Post by NunoGouveia2014 »

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