FiveLinux and MySQL

FiveLinux and MySQL

Postby Willy » Wed Jul 16, 2008 10:50 pm

I have done some test with FiveLinux.

Now I am ready to test it with the commercial SQL library.

The SQL lib is placed at several places but it is not found during linking

I have next error

/usr/bin/ld: cannot find -libsqlrdd

someone an idea what I am doing wrong.

The lib is also placed in the same folder as the .prg.

Thanks,

Willy Hermans
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Jul 17, 2008 2:05 pm

Willy,

If the name of the library is sqlrdd then you have to specify it in build.sh this way:

-lsqlrdd

Notice the -l in front of its name
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Willy » Thu Jul 17, 2008 3:30 pm

Thanks Antonio,

That does not help. I've tried that already.

Compiling 'demo01.prg'...
Lines 129, Functions/Procedures 2
Generating C source output to 'demo01.c'...
Done.
compiling C module...
linking...
/usr/bin/ld: cannot find -llibsqlrdd
collect2: ld gaf exit-status 1 terug
done!
./buildx.sh: line 24: ./demo01: Bestand of map bestaat niet
root@FiveLinux:/home/willy/fivelinux/sqlsamples#
Code: Select all  Expand view

Meanwhile I've just  heard that this library is only usable with xHarbour builder.

Thanks,

Willy.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Thu Jul 17, 2008 3:31 pm

Thanks Antonio,

That does not help. I've tried that already.
Code: Select all  Expand view
Compiling 'demo01.prg'...
Lines 129, Functions/Procedures 2
Generating C source output to 'demo01.c'...
Done.
compiling C module...
linking...
/usr/bin/ld: cannot find -llibsqlrdd
collect2: ld gaf exit-status 1 terug
done!
./buildx.sh: line 24: ./demo01: Bestand of map bestaat niet
root@FiveLinux:/home/willy/fivelinux/sqlsamples#

Meanwhile I've just heard that this library is only usable with xHarbour builder.

Thanks,

Willy.
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby xProgrammer » Tue Jul 22, 2008 10:09 pm

Hi Willy

Just wondering where that leaves you. I am going to have to move to a client-server model database backend to get reasonable performance across a VPN. I considered SQLRDD but I had two concerns. Firstly it was a lot bigger than I needed (if I am going to use PostgreSQL or mySQL I would just use SQL statements directly rather than use xBase commands translated). Secondly my impression is that the commercial xHarbour organisation is very Windows oriented (understandably perhaps) and I wasn't confident of getting the level of support that I would expect of a commercial product.

My current thinking is to use PostreSQL. There is supposedly an xBase wrapper for the C library that comes with PostgreSQL but the link to it on the internet is broken. It is listed as Windows and OS/2 but that shouldn't be too hard to migrate to Linux?

If you are still keen just maybe we can help each other?

Regards
xProgrammer
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Postby Willy » Wed Jul 23, 2008 8:37 am

Hello xProgrammer,

Long time ...

Well the final goal is to write once for Windows and Linux and to have one program easy to maintain, as well for Linux as Windows.

I Know that is a very big goal. I do not think to reach that in a minute.

But when I have some extra time I am happy to spend it that way.

Second point. 65 % of all webservers in the world are using PHP and MySQL.
What a reference.

When you can speak Clipper it is very easy to speek PHPand use the same MySQL tables in one project xHarbour/PHP

I've used MySQL already on a small basis. It works stable and fast.

Once you learn another way to filter your database it is easy.

The SQL driver from the commercial xHarbour is very good. What a concept. I have to change just one line of code in an ini file to put my application from MySQL to MSSQL or Oracle etc. It is costly but you have to pay only once for a long time. It is also available for the not commercial xHarbour. Unfortunate that you have to pay a lot for support.

I've tested it. It simply works good, fast and stable. I just use DBF for only local situations.

It is very unfortunate that there is not much cooperation between the little divided parts of th former Clipper community.
We, the clients, are all victims of that situation.

In Dutch we said something like this :
We have to row with the oars we have.

I think there is a future for our divided community once we realise that we can work together in PHP/xHarbour projects.

Where does it lead me. I do not know.
Where am I standing now.
In a position where it is very difficult to start with a Graphical Linux with SQL. There is'nt simply not yet a Getting started.

Luiz Rafael Culik Guimaraes gives me a lot of help getting started.

Once I have a good working system I TRY to write a simple Getting started.

So, I wish you a lot of success and I hope I still hear a lot from you.

Greetings,
Willy Hermans
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby xProgrammer » Wed Jul 23, 2008 10:31 am

Hi Willy (greetings from Australia)

Yes its a great shame that the xBase language hasn't got the momentum that it should have because

1. Nantucket was so slow to recognise the importance of being able to produce Windows applications.

2. The language appeared tied to flat ISAM data files

FiveWin solved the first (but I, probably like most poeople who were effectively forced away from the language they loved, only discovered it recently)

The second is clearly soluble.

I don't think that writing xBase fiveWin / FiveLInux code that will run on both platforms is that difficult if one is prepared to limit oneself to the more standard GUI elements that are supported as standard under FiveLinux. I don't think much would need to be done to my code for it to successfully run on both platforms but having said that I should point out that I pretty much switched to a Linux platform and have hardly touched Windows since.

The xBase / FiveWin community is fairly small, but it is clearly large in comparison to the xBase / FiveLinux community. Sometimes I think I should post in the FiveWin forum to try to get more people involved.

I was subscribing to xHarbour commercial (enterprise) and so do have a copy of SQLRDD but I haven't attempted to use it as yet. When I did contact them about using it I was a little underwhelmed by the response for a commercial product that whilst not terribly expensive, wasn't very cheap either. Have you used it from a FiveLinux application?

My leaning towards PostrgeSQL is based on issues such as support for transaction control (an important issue for some applications I have been involved with in the past).

I am very happy to share whatever experience I may have and some of my posts on this forum have attempted to get discussions / cooperation started (with relatively little effect to date).

Regards
Doug
(xProgrammer)
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Postby Willy » Wed Jul 23, 2008 10:53 am

Hello,

Maybe I have to open a new forum for the whole community. (x)Harbour, FiveWin, - etc.

A free forum where everybody is welcome where you do not have to pay.

At this point this forum is the very best. There is a better respons then in most visual basic forums.

But when you have a combination of Five soft and commercial xHarbour soft there is'nt much respons.

Greetings,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Willy » Thu Nov 13, 2008 6:05 pm

Meanwhile I've tried to use my Windows programs (including mysql) on Linux system with Wine.

It works fine.

Only when I want to open a pdf from within the application with shellexecute, it is not working.

Shortkeys also do not work.

But in general it is possible to develop under Windows and run the program stable and fast in a Linux environment.

Greetings

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby Antonio Linares » Thu Nov 13, 2008 9:11 pm

Willy,

Yes, Wine is improving very much.

Still some minor problems, but its a great software.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xProgrammer » Sat Nov 15, 2008 2:07 am

Hi Willy

Nice hearing from you again.

When I analysed what I really needed, I decided that I didn't need SQL but I did need client-server so I wrote my own client-server code that used xBase data files at the back end.

I chose that path because the SQL libraries seemed unnecessarily complicated (perhaps just my lack of understanding at the time). If I went SQL I wouldn't want my xBase commands translated to (inefficient) SQL, I would just rewrite my code to use SQL. Support for that no doubt bloats libraries that include that terribly.

Having subsequently brushed up on C coding and learnt a bit more about (x)Harbour internals (thanks Antonio!) I think I could interface to MySQL or
PostgreSQL if I needed to.

I know there are some libraries already out there for doing such things but lack of documentation I could understand and code that was more complex than certainly I needed made / make writing one's own interface code an option well worth considering.

Regards

Doug
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Postby Willy » Mon Nov 17, 2008 7:19 pm

Hello Doug,

What a job, writing your own dataserver. I've thought about it some years ago. I've read a book about the subject.

Indeed making your own data server in clipper.

But I think it is still a to big job and the result will be smaller and more difficult then simply using a free MySQL dbms with transaction controll and many other possibilities.

A professional DBMS also sounds better when you are talking with your clients.

Greetings,

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Postby xProgrammer » Mon Nov 17, 2008 7:56 pm

Hi Willy

There is some truth in what you say, but the reality is somewhat different from what people might think.

Writing a Clipper based data server to suit our purposes isn't that hard - it took me less than 2 days to get a basic functional system from scratch.

True I haven't included transaction control, but no pure xBase software has - is it really required for most applications?

It may not be "professional" whatever that means to you (is mySQL "professional" if you don't pay for it?) but it can be better tailored to the needs of your application and more highly integrated into your code (for example returning an (x)Harbour array which will update all the relevant properties of your object in one line of code).

Don't get me wrong. I'm not campaigning for anyone to follow the path I have chosen, but it is possible and I wouldn't simply dismiss it as too difficult or too hard to sell.

In essence all you are doing is splitting your code into two parts and writing a communications layer to sit between them. True there are some consequences for your code (basically maintenance of state issues) that may require a little re-working of your logic depending upon how your original code works.

Having said that, using a DBMS such as mySQL or PostgreSQL as your back end does have its advantages particularly in terms of making the data available to other applications and I may go down that route in other circumstances.

But using SQL as your query language does mitigate against nice object oriented code when it comes to data retrieval.

Regards
xProgrammer
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Postby Willy » Wed Nov 26, 2008 6:55 am

Hello Doug,

No problem at all.

I respect everybodys opinion.

And of course, with Clipper you can solve many different kind of problems.
Even a basic data client server is possible.

A lot succes wished with it.

(I hope my English is'nt toooo bad)

Greetings

Willy
Willy
 
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 4 guests