Will SQLRDD be ported to harbour?

721 views
Skip to first unread message

Marco Aur?lio V. da Silva

unread,
Aug 15, 2023, 10:37:06 AM8/15/23
to Harbour Developers
Dear Friends,

Now that the SQLRDD sources have been released, will it be ported to the harbour?


Rafa Pabd

unread,
Aug 16, 2023, 6:28:55 AM8/16/23
to Harbour Developers
+1

Francesco Perillo

unread,
Aug 16, 2023, 6:49:10 AM8/16/23
to harbou...@googlegroups.com
Where ate the source? 

Il Mar 15 Ago 2023, 16:37 Marco Aur?lio V. da Silva <marcop...@gmail.com> ha scritto:
Dear Friends,

Now that the SQLRDD sources have been released, will it be ported to the harbour?


--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/39f43b32-2cda-45ce-b719-0ec013be534bn%40googlegroups.com.

Marco Aur?lio V. da Silva

unread,
Aug 16, 2023, 7:43:33 AM8/16/23
to Harbour Developers

Eduardo Motta

unread,
Aug 16, 2023, 7:53:08 AM8/16/23
to harbou...@googlegroups.com

pcordo

unread,
Aug 17, 2023, 3:14:40 AM8/17/23
to Harbour Developers
+1

El dia dimecres, 16 d’agost de 2023 a les 13:53:08 UTC+2, Eduardo Motta va escriure:

Marcos Barroso

unread,
Aug 17, 2023, 6:57:45 AM8/17/23
to Harbour Developers
Good morning,

The company I work for has a large Harbour+DBFCDX application, and intends to convert to storage from DBFCDX to Postgres. We can sponsor financially this conversion (SQLRDD from xHarbour to Harbour), with the goal to be, at least, Windows/Linux + GCC + Postgres compatible.

We do not have the technical knowledge to make this conversion, but we have the need and we want to make it happen. If anyone is interested in performing this task, just contact me.

Marcos Barroso 
Aspec Informática

Felix Pablo Grande

unread,
Aug 17, 2023, 6:58:11 AM8/17/23
to Harbour Developers
Good morning !!!


From Carlos Vargas:

" I compiled the sqlrdd from the sources for xharbour and bcc 7.6, to do this you must install bison, why sqlrdd parses the SQL statements, also you must use harbour's hbmk2 with the -xhb option and use the sqlrdd.hbp, there is a bat which you must check which defines an environment variable that defines the path to bison."

Thanks Carlos !!!

Francesco Perillo

unread,
Aug 17, 2023, 6:40:34 PM8/17/23
to harbou...@googlegroups.com
Can anyone please point me to some docs that explain what sqlrdd is and its benefits?
I knew it was to use sql servers using harbour syntax but then there is a sql parser inside...

Thank you

Bacco

unread,
Aug 17, 2023, 6:51:29 PM8/17/23
to harbou...@googlegroups.com
"Can anyone please point me to some docs that explain what sqlrdd is and its benefits?
I knew it was to use sql servers using harbour syntax but then there is a sql parser inside.."

And IMHO, the more important question: how the great majority of Harbour Users can benefit from it being in the
core distribution, and what advantages the burden of mantaining it can justify it being distributed together with
HB (in special, being an old technology, as we already can use MySQL, SQLite and other good SQL engines
without anything else).

I think we need lot more than a dozen users wanting it to justify (of course, I can't speak in behalf of devs
that can accept paid work, but thinking as an user, I believe there are other priorities).

Regards
Bacco



Alexandre Cavalcante Alencar

unread,
Aug 17, 2023, 8:12:19 PM8/17/23
to harbou...@googlegroups.com
Hi Bacco,

I have had some experience with SQLRDD, and the major benefit of compared with other Database Drivers available in Harbour distribution is that, for a good parcel of applications, it would be a simple ~10 lines of code for initiating the lib, and no other changes to the code base.

It is attractive for quick and inexpensive mass conversions of applications to RDBMS. Surely you don’t get the fully extent of features you can get, however using the RDD simple syntax is a good trade-off in large complex applications.

I am not sure under which conditions / license the source code has been released, this can be an issue on its own.

Antonio had a similar work on a lib called ADO RDD, not sure where it landed.

From contribs and core, there are the SQLMIX, MySQL RDD and PostgreSQL RDD, however, they don’t allow for direct RDD replacement, requiring extensive re-write for any non-trivial application.

Bests

--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
--

john s wolter

unread,
Aug 17, 2023, 9:10:23 PM8/17/23
to harbou...@googlegroups.com
Alexandre,

All the RDD adapters you mention could be worth rewrites to broaden application's design space.  Harbour could be applied as frontend, backend, desktop applications, scripting, Webassembly, and generally user presentation applications.

RDBMS databases like IBM's DB2 and Oracle and open source RDBMs you mentioned are "set query" databases using SQL for results.   One common issue is doing something like incremental search of a set of names in a Harbour key-value list file.  I've worked back & forth using Harbour.  I dislike the "Cursor" approach to solve that problem.

Harbour db is a key-value list file.  Would it be "dreamy" if a "set query" result would become a virtual file that Harbour could use directly?

Cheers, John S Wolter, Johnny 4-Shots, Johnny One Eye, Staying Safe, Hands Washed, 
Immune Challenged, Masked, 2-meters, Remote & Hybrid Team meetings okay.
--------------------
LinkedIn: John S Wolter, johnswolter
Also signed "the Vikings - You've been warned"


image.png



Marco Aur?lio V. da Silva

unread,
Aug 18, 2023, 10:03:54 AM8/18/23
to Harbour Developers
The main importance of the sqlrdd lib is for the time to convert legacy systems to SQL databases, the conversion is fast, obviously with an initial performance loss, but in the sequence, it allows converting the rest of the system to SQL commands with more time. Remembering that it allows you to execute native SQL commands.

Bacco

unread,
Aug 18, 2023, 1:29:57 PM8/18/23
to harbou...@googlegroups.com
Hi, Marco

"The main importance of the sqlrdd lib is for the time to convert legacy systems to SQL databases,
the conversion is fast, obviously with an initial performance loss, but in the sequence, it allows converting
the rest of the system to SQL commands with more time"

Still I believe we are running in circles. "main importance for who?" - I know what is SQLRDD, can't see
it's being useful to the majority of users, as this scenario is very specific to few users that may once in a
lifetime need it. A separate lib is enough in this case, and there are plenty of other ways (no mater if it
will cost 12 instead of 10 lines, this is irrelevant, as long you are confident with the result, and it won't
create a new burden).

My impression of a niche use case is growing stronger as this thread grows mostly with same users
(also, it seems to me more as personal desire, instead of a technical need that justifies it). I'll will try
to avoid bringing other arguments here for now to avoid bashing the product directly, as I don't want
to be misinterpreted, as the product per se is not the focus, just Harbour itself. but for now, it seems
to me that it's clearly another niche feature with lots of best ways to solve if someday it becomes a
real problem.

Harbour even has a lot of plained or envisioned features that were listed on its documentation files,
(and even some 3.4 contribs that seems more universal) I probably think if someones want to embrace
a new harbour feature, there's a long list of more relevant discussions open (I'm not listing which, so
we don't have another random points to cross-inflate the thread)

Anyway, it's just my point of view (based on some obvious things I noted, no one speaks out loudly
without any reason), I think this is getting very long and we have enough questions open (Why on
earth general comunity would benefit, what's the license, why on core instead of just loading it separately,
who will mantain, for how much time, and so on)

Best Regards
Bacco










john s wolter

unread,
Aug 20, 2023, 12:10:40 AM8/20/23
to harbou...@googlegroups.com
I'm willing to speculate that Harbour or xHarbour programmers may find some interesting applications of a use for any way to expand into the BIG IRON with specialized and inventive uses.  Full speed ahead.

Cheers, John S Wolter, Johnny 4-Shots, Johnny One Eye, Staying Safe, Hands Washed, 
Immune Challenged, Masked, 2-meters, Remote & Hybrid Team meetings.
--------------------
LinkedIn: John S Wolter, johnswolter

Pritpal Bedi

unread,
Aug 20, 2023, 4:15:44 PM8/20/23
to Harbour Developers
Hi Everybody

You can consider extremely high-performance, native, and usaable excatly like dbfcdx, with few (seldome used) features, running in production for a large company since 2007 - CacheRDD.

You can find more details, documentation, and sources here

Source Repository
https://sourceforge.net/projects/cacherdd/?source=directory

Before starting with CacheRDD I was testing SqlRDD as publiched by Ron Pinkas, now. The only downside is Cache database is not free, and is also costly.


Pritpal Bedi
a student of software analysis & concepts


Ron Pinkas

unread,
Sep 13, 2023, 2:59:48 PM9/13/23
to Harbour Developers
2023-09-13 12:35 UTC-0500 Ron Pinkas <ronpinkas/AT/gmail/com>
+ xHarbour-to-Harbour.txt
+ New text file borrowed from: https://wiki.xailer.com/doku.php?id=en:migrar.de.xharbour.a.harbour
/*
Thanks to Jose F. Gimenez
*/

* xHarbourBuilder/xHarbour-SQLRDD/source/compat.c
* xHarbourBuilder/xHarbour-SQLRDD/source/compat.h
* xHarbourBuilder/xHarbour-SQLRDD/source/exprobjs.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/exprrelation.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/exprtransl.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/firebird.c
* xHarbourBuilder/xHarbour-SQLRDD/source/firebird3.c
* xHarbourBuilder/xHarbour-SQLRDD/source/oraclip.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/oraedit.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlact.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlconnection.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex1.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex1ora.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex2.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex2ora.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex3.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlex3ora.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlfirebird.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlfirebird3.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlgen1.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlmaria.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlodbc.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlpgs.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlrdd.hbx
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlrdd0.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlrdd1.c
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlrdd2.prg
* xHarbourBuilder/xHarbour-SQLRDD/source/sqlsrodbc.c
* xHarbourBuilder/xHarbour-SQLRDD/source/utils.prg
! Fixes by Przemyslaw Czerpak to compile with Harbour
/*
Thanks to Przemyslaw Czerpak
              */

Aleksander Czajczynski

unread,
Sep 13, 2023, 4:45:53 PM9/13/23
to harbou...@googlegroups.com
Hi!

Many thanks guys, Ron, Przemek, original inventors and involved contributors! SQLRDD ChangeLog reveals that Przemek had a first round on Harbour compat there in 2012.
Quite signficant thing as seen by many Clipp*rheads. Would be great if a nightly/auto build included it in compiled extras, so interested users could try it out. PostgreSQL being the easiest to build?

Best regards, Aleksander

Ron Pinkas wrote:
2023-09-13 12:35 UTC-0500 Ron Pinkas <ronpinkas/AT/gmail/com>
+ xHarbour-to-Harbour.txt
+ New text file borrowed from: https://wiki.xailer.com/doku.php?id=en:migrar.de.xharbour.a.harbour
/*
Thanks to Jose F. Gimenez
*/

* xHarbourBuilder/xHarbour-SQLRDD/source/compat.c
* xHarbourBuilder/xHarbour-SQLRDD/source/compat.h
[...]

Gerald Drouillard

unread,
Sep 13, 2023, 5:41:40 PM9/13/23
to harbou...@googlegroups.com
Compiling under Harbour was not bad.  Just a few minor changes so far. 
Using postgres, I had to do a few changes to convert the dbf's and cdx's, but my use case is pretty extreme with very large tables and a few complex indexes.
I have the database conversion just about done with table partitioning (for large tables).
So far the SQLRDD seems very well done and easy to work with as most of my changes so far have been at the prg level and not any c changes.
Getting close to testing. 


--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages