Harbour and MySQL

1,838 views
Skip to first unread message

Lucas B.

unread,
Jun 27, 2012, 5:54:03 PM6/27/12
to harbou...@googlegroups.com
Hello,
 
I would like to ask you wich of the contribs is the more stable to use MySQL under Harbour.
 
Also, I would like to ask the leaders of the Harbour community why they do not consider this as a priority issue. In fact, the easiest way to allow existing applications to work with MySQL is SQLRDD, but there is not enough interest.
 
I was wondering why.
 
And, how can I help to push up the develpment of SQLRDD?. Financial contribution?.
 
Thank you for your help and advice.
 
Best regards,

Viktor Szakáts

unread,
Jun 27, 2012, 8:30:03 PM6/27/12
to harbou...@googlegroups.com
Hi,

On Wed, Jun 27, 2012 at 11:54 PM, Lucas B. <lucasde...@gmail.com> wrote:
> I would like to ask you wich of the contribs is the more stable to use MySQL
> under Harbour.

SDDMY seems to be the better choice, though
HBMYSQL's low-level API should also work fine.
It's a matter of taste/needs.

> Also, I would like to ask the leaders of the Harbour community why they do
> not consider this as a priority issue. In fact, the easiest way to allow
> existing applications to work with MySQL is SQLRDD, but there is not enough
> interest.
>
> I was wondering why.

Nobody contributed open-source code
implementing "SQLRDD" functionality yet.

> And, how can I help to push up the develpment of SQLRDD?. Financial
> contribution?

It could help encouraging contributors, but
development of a component like "SQLRDD"
seems like a large undertaking, and probably
it's not very economic to finance/develop it
with only a few backers.

For potential users it might be cheaper/faster
to buy an existing product, f.e. Mediator.

For potential contributors, a Kickstarter
project could be launched to raise funding.

-- Viktor

Mindaugas Kavaliauskas

unread,
Jun 28, 2012, 3:01:35 AM6/28/12
to harbou...@googlegroups.com
Hi,


> And, how can I help to push up the develpment of SQLRDD?. Financial
> contribution?.

C code contribution :)


Regards,
Mindaugas

Mindaugas Kavaliauskas

unread,
Jun 28, 2012, 4:09:27 AM6/28/12
to harbou...@googlegroups.com
Hi,


On 2012.06.28 03:30, Viktor Szakáts wrote:
>> Also, I would like to ask the leaders of the Harbour community why they do
>> not consider this as a priority issue. In fact, the easiest way to allow
>> existing applications to work with MySQL is SQLRDD, but there is not enough
>> interest.
>>
>> I was wondering why.
>
> Nobody contributed open-source code
> implementing "SQLRDD" functionality yet.

I'm not sure you and Lucas use the same meaning for SQLRDD.

To clarify: you mean "SQLRDD" a tranparent SQL to DBF engine with
possibilities like SQLRDD from xHarbour.

Lucas wrote in his letter "What is the status and updates for SQLRDD?",
so, I understand he means /contrib/rddsql by saying SQLRDD.


>> And, how can I help to push up the develpment of SQLRDD?. Financial
>> contribution?
>
> It could help encouraging contributors, but
> development of a component like "SQLRDD"
> seems like a large undertaking, and probably
> it's not very economic to finance/develop it
> with only a few backers.
>
> For potential users it might be cheaper/faster
> to buy an existing product, f.e. Mediator.
>
> For potential contributors, a Kickstarter
> project could be launched to raise funding.

The next main question after lack developers interest is the expectation
of SQLRDD. How many people understand, that in "SQLRDD" from Harbour
DBEVAL() can evaluate some records several times, and skips some of them
completely (BTW, just like in DBF)?

Lucas, what are you missing from current RDDSQL?


Regards,
Mindaugas

Viktor Szakáts

unread,
Jun 28, 2012, 5:03:26 AM6/28/12
to harbou...@googlegroups.com
> I'm not sure you and Lucas use the same meaning for SQLRDD.
>
> To clarify: you mean "SQLRDD" a tranparent SQL to DBF engine with
> possibilities like SQLRDD from xHarbour.

Yes, exactly.

-- Viktor

Lucas B.

unread,
Jun 28, 2012, 9:40:56 AM6/28/12
to harbou...@googlegroups.com
Hello,
 
Thanks for the reply.
 
Yes, I am refering to SQLRDD like the one provided by xHarbour.com.
 
It allows to work with MySQL exactly the same as a DBF (APPEND BLANK, SELECT, USE, rlock(), ...).
 
Yes, I tried RDDSQL. I noticed two facts:
 
It does not allow USE "tablename" NEW
 
xBrowse() from Fivewin is not working.
 
 
I am afraid I can´t contribute with C code as my knowledge about C is limited. But I can assist you with testing.
 
 
About Mediator, does it requiere to have a middleware between the RDD and MySQL?. I send them an email asking also about a recent demo but I did not get a reply.
 
 
Thanks agian for the attention.
 
Best regards,
 
 
C code contribution :)

Viktor Szakáts

unread,
Jun 28, 2012, 10:10:00 AM6/28/12
to harbou...@googlegroups.com
> About Mediator, does it requiere to have a middleware between the RDD and
> MySQL?. I send them an email asking also about a recent demo but I did not
> get a reply.

It does, and it seems to be a technical requirement
to implement the thing properly. SQLRDD doesn't
require one, but it's consequently less efficient and
more hacky.

-- Viktor

francesco perillo

unread,
Jun 28, 2012, 10:21:10 AM6/28/12
to harbou...@googlegroups.com

Probably I don't see clearly, but why do you want to use a recordset-oriented database with the syntax of a record-oriented database ?

I may think of:
- not studying the SQL syntax  (a pity, since one SQL query can replace complex harbour code)
- reusing existing code as-is (a bit dangerous, I will test every feature)

... other ?

Francesco



Viktor Szakáts

unread,
Jun 28, 2012, 10:27:45 AM6/28/12
to harbou...@googlegroups.com
Yes, translating one approach to the other is definitely
a _compromise_. In performance, in components, in
setup required, in speed, versus no need to change existing
source code. One needs to assess the costs and benefits
of one approach versus the other.

The technically optimal solution is to switch to recordset
oriented approach, aka native SQL. (or NoSQL based
solution, if it's an option)

One component could help this from Harbour side: a JDBC-like
component that'd translates between generic SQL requests
and different SQL backends. We tried HDBC, and failed. It's
also not trivial task. Basically that would be an RDD for SQL
backends, but with a recordset oriented API.

-- Viktor

Lucas B.

unread,
Jun 28, 2012, 1:57:59 PM6/28/12
to harbou...@googlegroups.com
I tested xHarbour.com SQLRDD and works pretty good.
 
I added it to a small contained sample and worked very very good accesing MySQL via Internet.
 
xBrowsing is almost inmediate!!.
 
 
But I have some questions and also I discovered some missing points in the demo version. I wrote many mails to xHarbour.com and I have not get an answer, so that scares me from investing 1.000 euros in a product with no support and no interest of attending customers.
 
In fact, I should also change to xHarbour, but I am very happy with Harbour.
 
So SQLRDD is possible and it works as fast as, for example, Eagle 1 or TDolphin.

Viktor Szakáts

unread,
Jun 28, 2012, 2:11:47 PM6/28/12
to harbou...@googlegroups.com
On Thu, Jun 28, 2012 at 7:57 PM, Lucas B. <lucasde...@gmail.com> wrote:
> I tested xHarbour.com SQLRDD and works pretty good.
>
> I added it to a small contained sample and worked very very good accesing
> MySQL via Internet.
>
> xBrowsing is almost inmediate!!.
>
>
> But I have some questions and also I discovered some missing points in the
> demo version. I wrote many mails to xHarbour.com and I have not get an
> answer, so that scares me from investing 1.000 euros in a product with no
> support and no interest of attending customers.
>
> In fact, I should also change to xHarbour, but I am very happy with Harbour.
>
> So SQLRDD is possible and it works as fast as, for example, Eagle 1 or
> TDolphin.

Thanks for sharing.

Speed in a small test is IMO not a proof that it will
scale well for a large app and work reliably in every
situations (and against all supported SQL backends).

I remember reading an analysis on this list few years
ago and it didn't suggest a spotless picture of SQLRDD,
as far as its core idea and implementation went.

Also, SQLRDD only supported Windows/BCC last
time I knew.

Probably it'd be useful for this product if it would be
ported to Harbour and put it under the "stress" of a larger
audience and more sophisticated set of technologies
like multiple CPs, MT, various platforms and C compilers.
But, this depends on business interest, the programmer(s)
behind it and it's core design.

-- Viktor

Rafael Culik

unread,
Jun 28, 2012, 2:53:15 PM6/28/12
to harbou...@googlegroups.com
Victor

SQLRDD support ALL platforms inclusing all linux,windows,hpux,solaris,aix

Regards
Luiz

2012/6/28 Viktor Szakáts <har...@syenar.net>:

Pritpal Bedi

unread,
Jun 28, 2012, 3:05:17 PM6/28/12
to Harbour Developers
Hi

> SQLRDD support ALL platforms inclusing all linux,windows,hpux,solaris,aix

True.

But it does not support BIG files.
I have test cases with me where it sucks.

Pritpal Bedi

PS also it does not handle/support
MT applications. I did spent a countless nights
discussing finer aspects with Marcelo. Also
it would be nice if Marcelo Lombardo do reply
to these doubts.

Lucas B.

unread,
Jun 28, 2012, 3:23:13 PM6/28/12
to harbou...@googlegroups.com
Hi,
 
I did my test using a table with 5.000 records.
 
I also compared the speed with tDolphin, Eagle1 and ADS/AIS.
 
I did not test with largest records.
 
I noticed the same speed as with a DBF in local mode, but I did the tests using a server in the internet.
 
But I sent several emails to Patrick and I did not get a reply...

Rafael Culik

unread,
Jun 28, 2012, 3:48:45 PM6/28/12
to harbou...@googlegroups.com
Hi Pritpal

Sorry. sqlrdd support bigfiles with out problem

Regards
Luiz

2012/6/28 Lucas B. <lucasde...@gmail.com>:

Viktor Szakáts

unread,
Jun 28, 2012, 8:23:15 PM6/28/12
to harbou...@googlegroups.com
Hi Luiz,

On Thu, Jun 28, 2012 at 8:53 PM, Rafael Culik <cul...@gmail.com> wrote:
> Victor
>
> SQLRDD support ALL platforms inclusing all linux,windows,hpux,solaris,aix

Thanks, I didn't know. Does it also support all C compilers
on these platforms, particularly mingw and msvc on Windows?

-- Viktor

Rafael Culik

unread,
Jun 28, 2012, 9:36:13 PM6/28/12
to harbou...@googlegroups.com
Victor

yes, even that i dont consider mingw as na native c compiler as
borland c++ and msvc

Regards
Luiz

2012/6/28 Viktor Szakáts <har...@syenar.net>:

Lucas B.

unread,
Jun 29, 2012, 6:25:00 AM6/29/12
to harbou...@googlegroups.com
Viktor is right, a test verion should be available for Harbour.
 
If the product is as good as xHarbour.com says, it will be a bestselling.

Viktor Szakáts

unread,
Jun 29, 2012, 6:30:27 AM6/29/12
to harbou...@googlegroups.com
On Friday, June 29, 2012, Rafael Culik wrote:
Victor

yes, even that i dont consider mingw as na native c compiler as
borland c++ and msvc

"native" in C compiler context has no meaning in general and even less on Windows which doesn't come with any C compiler by default. Probably you mean "not originally developed for Windows", or "portable". The first 
one has no importance these days, the second is a very useful property.

As far as Windows C compilers go we have a wide palette to choose from and mingw happens to be one of the best ones and runs and works just as "native" as any other. Things have changed a lot since Cygwin. BCC can be as native as one wants it to believe, but it won't fix the fact that its last free version is 10+ years old and it's by far the weakest of the bunch.

What I rather see is that mingw (and several other "native" compilers) are much stricter than BCC, so many low-quality code starts to show a lot of warnings and even errors, plus some delicately ugly hacks (like inline Intel ASM) won't work anymore. In this case, the C source code is to blame, not the C compiler.

-- Viktor

Lucas B.

unread,
Jun 30, 2012, 4:05:05 AM6/30/12
to harbou...@googlegroups.com
Hello,
 
I received a very interesting email from Elvira:
 
"Lucas,

I am afraid xHarbour.com is a failed company. It does still offer a compiler compiled with Pelles, no 64 bits version, no support... It is mainly runned by Patrick Mast.

But what I want to share is that our company purchased SQLRDD a couple of years before. We had several issues and we did not get a reply from Patrick. We sent many many emails but not reply. We quit SQLRDD.

He is not a serious busssiness man. And, in some kind, the product is a scam. It is very evident in the experience shared by Lucas that he does not provide a working demo and he does not reply the mails too.

The best tip to do with SQLRDD from xHarbour.com and Patrick Mast is just ignore it. It does not work at all".
 
Hope it helps.
 
Best regards,

Massimo Belgrano

unread,
Jun 30, 2012, 4:43:57 AM6/30/12
to harbou...@googlegroups.com
Mediator seem have a better product that sqlrdd
require a few change
put the RDDSETDEFAULT("MEDNTX") function call at the beginning of your
and swicth from 
SET FILTER TO   SET SQL FILTER TO  Such filter is evaluated by database server.  
so will be easy tested to verify if works

also if it have a different price policies with royalty
and have a limitation who allow connect to 1 mediator server (same user using rddsql in conjunction)
I hope that mediator start sell a dealer kit with unlimited activation for customer of <=100/50/25 client
and allow customer kit
I want also notice a Free, unlimited version of Mediator server for MySQL for Harbour Platform: WinNT/2000/XP/2003/Vist


Another product can be https://code.google.com/p/sqllib/ A Free RDD for Harbour compiler to use with MySQL & PostgreSQL seem not updated from 2010
Cames from Vailton Ranato that have also made the xdevstudio a free visual editor


2012/6/30 Lucas B. <lucasde...@gmail.com>
--
Massimo Belgrano

Patrick Mast

unread,
Jun 30, 2012, 10:37:53 AM6/30/12
to harbou...@googlegroups.com, Lucas, Rafael Culik, Ron Pinkas, Marcelo Lombardo
Hello Elvira,

I'm sorry Lucas feels this way. We at xHarbour.com are trying to serve our customers at the best way we can. SQLRDD is a GREAT product, used by many users with great success.

You are right on the demo side of SQLRDD packages. I must find a better way for the BCC demo editions to get to our users. I promise I will try to find a better solution for this.

Lucas, please feel free to use our SQLRDD technical support NG at :
We are ready to assist you on all your SQLRDD issues.

If you have any further questions or comments, please don't hesitate to contact me personally. I will be pleased to provide you with any assistance you may need.

All the best and thank you for your support.

Patrick Mast,
xHarbour.com

Bacco

unread,
Jun 30, 2012, 3:40:57 PM6/30/12
to harbou...@googlegroups.com
Hi Lucas

I'm using the curent harbour wrapper directly, with no problems and
for a long time.
Note that I'm using the API, not the implemented classes. I use it in
many remote
databases with different link qualites, and it's very fast and stable.

The implementation is in contrib\hbmysql\mysql.c and the function set
implemented is very complete.

Here is a quick sample, just to you see how it's done:


Procedure Main()

conn := mysql_real_connect( 'serveraddress', 'user', 'password' )

If mysql_error( conn ) == ""

mysql_query( conn, "SELECT id,name FROM database.table ORDER BY name" )
res := mysql_store_result( conn )

// Loop to show the results
While ( row := mysql_fetch_row( res ) ) != NIL .and. row[ 1 ] != NIL

? "Id:",row[ 1 ],"Name",row[ 2 ]

End
End


Regards,
Bacco

francesco perillo

unread,
Jun 30, 2012, 5:05:01 PM6/30/12
to harbou...@googlegroups.com

In php you can also write row["id"], row["name"].
Is it possible in hbmysql?

Maurilio Longo

unread,
Aug 1, 2012, 5:30:25 AM8/1/12
to harbou...@googlegroups.com
Hi francesco, the answer is no, since the result is an array and not a hash. Maurilio. francesco perillo wrote: > In php you can also write row["id"], row["name"]. > Is it possible in hbmysql? __________ | | | |__| Maurilio Longo |_|_|_|____| farmaconsult s.r.l.
Reply all
Reply to author
Forward
0 new messages