HMG ODBC Best Practices

Moderator: Rathinagiri

Post Reply
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

HMG ODBC Best Practices

Post by melliott42 »

Hello,

I realize HMG is mainly an amazing GUI. Though there are many ways to do things I may not be using the best suited for HMG now in 2016.

Could you please share a code snippet on how you have best found to connect and interact (SQL) with a database via ODBC and HMG 3.4.x?


Thanks,

Michael
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: HMG ODBC Best Practices

Post by Rathinagiri »

As you have mentioned, HMG is basically a GUI wrapper over Harbour. Harbour is having the functionality to connect to ODBC via hbodbc library.

This library is already included in every Harbour distribution along with a test program. Have you used that?

The file can be reached from hmg folder C:\hmg.3.4.2\HARBOUR\contrib\hbodbc\tests
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: HMG ODBC Best Practices

Post by melliott42 »

Thanks Rathinagiri.

I have been using sddodbc. It connects well to Oracle 11g\12c and I can pull data OK into various HMG controls. Just wondering if there are any particular (ODBC or ADO or OCI) advantages or best practices with HMG.

I have not used hbodbc yet. Rathinagiri is that what you are finding works best with HMG for SQL databases, without buying third party products of course?


Thanks,

Michael
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: HMG ODBC Best Practices

Post by Rathinagiri »

Michael,

If you ask my experience, I always use native connection to any database and not ODBC.

I am using SQLite for single user system and MySQL (MariaDB) for multiuser systems. I need not change not more than 10 lines of code in my source files to change to any of these database systems. I use SQLCipher for encrypted database.

All these being open source, there is no dependency of third party products or performance loss.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: HMG ODBC Best Practices

Post by melliott42 »

Thats great feedback Rathinagiri! Thanks.

As I migrate apps to 64-bit HMG and start to create new ones it is a good time to reevaluate.
Post Reply