Page 1 of 2

HMGSQL - HMG -> MySQL/PostgreSQL/SQLite Bridge

Posted: Thu Jul 08, 2010 3:41 pm
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 1274 times

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

Posted: Thu Jul 08, 2010 6:43 pm
by luisvasquezcl
Muchas gracias Rathi.
como siempre haciendo buenos aportes.
saludos cordiales,
luis vasquez

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

Posted: Fri Jul 09, 2010 10:56 am
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

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

Posted: Fri Jul 09, 2010 2:33 pm
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.

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

Posted: Fri Jul 09, 2010 4:03 pm
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.

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

Posted: Fri Jul 09, 2010 4:25 pm
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

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

Posted: Fri Jul 09, 2010 4:36 pm
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.

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

Posted: Mon Jul 12, 2010 11:31 am
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

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

Posted: Mon Jul 12, 2010 1:12 pm
by Rathinagiri
Thanks for checking out Claudio.

I am happy that, it is helpful to somebody. :)

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

Posted: Fri Apr 04, 2014 12:23 pm
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?