Lazarus

Free Pascal => Beginners => Topic started by: pascal111 on July 06, 2022, 06:40:38 pm

Title: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 06:40:38 pm
I was following tutorials of next links:

https://wiki.freepascal.org/Lazarus_Database_Overview (https://wiki.freepascal.org/Lazarus_Database_Overview)

https://wiki.freepascal.org/SQLdb_Tutorial0 (https://wiki.freepascal.org/SQLdb_Tutorial0)

https://wiki.freepascal.org/SQLdb_Tutorial1 (https://wiki.freepascal.org/SQLdb_Tutorial1)

I was trying apply the example, but I found an error that I don't understand like in next image. I tried to use  Firebird Embedded 2.5 and extracted its demanded files as it is explained in https://wiki.freepascal.org/SQLdb_Tutorial0 (https://wiki.freepascal.org/SQLdb_Tutorial0) but I still has a problem. I have poor knowledge in databases, I know the basics only.

https://i.postimg.cc/3NV1PyvX/pas1-Untitled-1-copy.jpg (https://i.postimg.cc/3NV1PyvX/pas1-Untitled-1-copy.jpg)
Title: Re: A problem with Firebird Embedded 2.5
Post by: af0815 on July 06, 2022, 06:45:57 pm
The answer is in the picture.

The DB found is Version 13.0. But the version of DB-driver supported by Lazarus can only Version 11.2.


Is the db created by Lazarus or with a external tool ? (Or copied from samples folder of the firebird installation)

Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 06, 2022, 06:54:25 pm
Just do not use Firebird. >:D Almost nobody uses it and should not use it, except from some old Delphi programmers who insist on it.
It is not a mainstream format and FPC supports almost all mainstream databases.
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 06:56:10 pm
The answer is in the picture.

The DB found is Version 13.0. But the version of DB-driver supported by Lazarus can only Version 11.2.


Is the db created by Lazarus or with a external tool ? (Or copied from samples folder of the firebird installation)

The DB file is created by Firebird server last version. How we can solve this problem?
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 06:57:16 pm
Just do not use firebird. >:D

The tutorial said the fastest way for DB is firebird!
Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 06, 2022, 07:00:18 pm
The tutorial said the fastest way for DB is firebird!
That is a bad advice.. Ignore it. Where is that manual? Time to burn it.
If I have the time I will adapt those entries, btw.
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 07:06:09 pm
The tutorial said the fastest way for DB is firebird!
That is a bad advice.. Ignore it. Where is that manual? Time to burn it.
If I have the time I will adapt those entries, btw.

https://wiki.freepascal.org/SQLdb_Tutorial0 (https://wiki.freepascal.org/SQLdb_Tutorial0)
Quote
If you want to get up and running quickly, I'd suggest installing the Firebird server and example database as described below.
Title: Re: A problem with Firebird Embedded 2.5
Post by: Handoko on July 06, 2022, 07:30:50 pm
English is not my native language but I'm sure:

Quickly <> Fastest

 ;D
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 07:41:30 pm
English is not my native language but I'm sure:

Quickly <> Fastest

 ;D

Look yourself in English-Arabic dictionary:

https://i.postimg.cc/L8DY5J92/fast-Untitled-1-copy.jpg (https://i.postimg.cc/L8DY5J92/fast-Untitled-1-copy.jpg)

https://i.postimg.cc/fbgV71SP/quick-Untitled-2-copy.jpg (https://i.postimg.cc/fbgV71SP/quick-Untitled-2-copy.jpg)
Title: Re: A problem with Firebird Embedded 2.5
Post by: alpine on July 06, 2022, 07:50:08 pm
Qickly <> Fastest
Definitely! ;)
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 07:52:34 pm
Qickly <> Fastest
Definitely! ;)

Prove that (if you can  >:D)!
Title: Re: A problem with Firebird Embedded 2.5
Post by: rvk on July 06, 2022, 08:35:27 pm
The DB file is created by Firebird server last version. How we can solve this problem?
Don't listen to Thaddy. It's his personal opinion.

I've worked with Firebird for over 18 years (since version 1.5 and Interbase before that) and love it and have absolutely no problems with it.

The problem from you starting post is that you have an existing DB made in Firebird 3 and you want to access it using Firebird 2.5.
That's not possible.
Install Firebird 3.0 or use a database which is for 2.5.

Where does this database come from?

BTW. Lazarus can do Firebird 3.0 perfectly fine.
What components are your using.
You could think about using IBX for Lazarus (special for Firebird).
But I'm sure the default components can handle it too (because the drivers haven't changed).

But you can't access a 3.0 database with Firebird 2.5. That's a problem with any database you will use.
Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 06, 2022, 08:55:22 pm
English is not my native language but I'm sure:

Quickly <> Fastest

 ;D
Correct. Use something that can be maintained from the start, not something that gives your customer headaches if something happens to you.
ALWAYS use industry standards. Firebird is not one of those.....
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 08:59:28 pm
The DB file is created by Firebird server last version. How we can solve this problem?
Don't listen to Thaddy. It's his personal opinion.

I've worked with Firebird for over 18 years (since version 1.5 and Interbase before that) and love it and have absolutely no problems with it.

The problem from you starting post is that you have an existing DB made in Firebird 3 and you want to access it using Firebird 2.5.
That's not possible.
Install Firebird 3.0 or use a database which is for 2.5.

Where does this database come from?

BTW. Lazarus can do Firebird 3.0 perfectly fine.
What components are your using.
You could think about using IBX for Lazarus (special for Firebird).
But I'm sure the default components can handle it too (because the drivers haven't changed).

But you can't access a 3.0 database with Firebird 2.5. That's a problem with any database you will use.

Nice! I'll try what you said tomorrow because I'm tired now. I wasted another day without reaching to an effective learning for Lazarus.

By the way, for our other friends who care about the matter of "Qickly <> Fastest" I'll say that it'll be so difficult to prove that with English except if you are an expert in English. Many times clarifying the differences between similar English words by English itself will be an obscure work, that you'll reach to a no so good clear meanings, or you lack kind of Arabization of the meanings, and it's - according to my experience in English - some difficult in English itself for some essential attributes of English itself that it's not so free language in its ways of expressing like Arabic. When we speak English, we are together in closed room in this world, but when we speak Arabic, we bring our works to be shown outside to the reality.
Title: Re: A problem with Firebird Embedded 2.5
Post by: pascal111 on July 06, 2022, 09:02:22 pm
Correct. Use something that can be maintained from the start, not something that gives your customer headaches if something happens to you.
ALWAYS use industry standards. Firebird is not one of those.....

I think Pascal planned not to make me reach high level in Lazarus in Egypt, maybe if I came to USA he will leave me to learn and do more.
Title: Re: A problem with Firebird Embedded 2.5
Post by: rvk on July 06, 2022, 09:05:57 pm
Correct. Use something that can be maintained from the start, not something that gives your customer headaches if something happens to you.
ALWAYS use industry standards. Firebird is not one of those.....
Hahaha, and FPC and Lazarus aren't industry standards either.
So by that logic... Stay away from FPC and Lazarus if you don't want to give your customers headaches if something happens to you  :D
Title: Re: A problem with Firebird Embedded 2.5
Post by: Nicole on July 14, 2022, 05:27:35 pm
I am very new to Lazarus, but very old to Firebird and Delphi.

My first idea is: Why use firebird 2.5 instead of 4?

Me next suggestion is:
Try to do some work by the Freeware FlameRobin. Just grab it and give it a try. I will explain itsself.

about SQL:
Firebird uses SQL dialect 3, the same as Flamerobin.
The SQL-editor of Flamerobin offers nice things, give it a try. Some queries you can do from there with ease (others not).

As said before, I have not worked with Firebird and Delphi before, but I will soon.
And I will use Zeos.

These links I grabbed for this purpose. Not sure, if they work. to me they look good
https://www.firebirdfaq.org/faq337/
https://lazarus.intern.es/firebird_lazarus_beachten.html
Title: Re: A problem with Firebird Embedded 2.5
Post by: 440bx on July 14, 2022, 06:07:04 pm
By the way, for our other friends who care about the matter of "Qickly <> Fastest" I'll say that it'll be so difficult to prove that with English except if you are an expert in English. Many times clarifying the differences between similar English words by English itself will be an obscure work, that you'll reach to a no so good clear meanings, or you lack kind of Arabization of the meanings, and it's - according to my experience in English - some difficult in English itself for some essential attributes of English itself that it's not so free language in its ways of expressing like Arabic.
It doesn't really take an expert and, if you are interested in mastering English then you should be interested in the differences between such words.

Fastest implies a comparison.  It means that in a given set of elements, there is one that is faster than all other elements in the set.  For instance, in the set of 100m runners, the fastest ever is Usain Bolt who set the current record.

The people he competed against were obviously very quick and fast (much faster than the average person), therefore it is accurate to say they are quick but, none of them are the fastest, that distinction, so far, can only be used to describe Usain Bolt.

In general terms, Quick is something that happens in less than the average time (for whatever is being measured).  Fastest means there is nothing quicker (in the set of course, light is faster than Mr. Usain Bolt, but that is a different set.) So far, if you believe Einstein, light is the fastest of any element in the set of elements that move.

Hopefully, that makes the difference between quick and fast clear.  This is a quick explanation but, it certainly hasn't been the fastest one. :D
Title: Re: A problem with Firebird Embedded 2.5
Post by: alpine on July 14, 2022, 06:50:16 pm
By the way, for our other friends who care about the matter of "Qickly <> Fastest" I'll say that it'll be so difficult to prove that with English except if you are an expert in English. Many times clarifying the differences between similar English words by English itself will be an obscure work, that you'll reach to a no so good clear meanings, or you lack kind of Arabization of the meanings, and it's - according to my experience in English - some difficult in English itself for some essential attributes of English itself that it's not so free language in its ways of expressing like Arabic.
It doesn't really take an expert and, if you are interested in mastering English then you should be interested in the differences between such words.
*snip*
Well, if that's what it takes...

nothing expert here, just a basic rule for suffixes:
=> Quick-ly (adverb) <> Fast-est (superlative)
Title: Re: A problem with Firebird Embedded 2.5
Post by: 440bx on July 14, 2022, 07:24:38 pm
Well, if that's what it takes...

nothing expert here, just a basic rule for suffixes:
  • -ly a suffix forming adverbs from adjectives
  • -er a suffix used in forming the comparative degree of adjectives
  • -est a suffix forming the superlative degree of adjectives and adverbs
=> Quick-ly (adverb) <> Fast-est (superlative)
What you said is correct.  What I wanted to point out is the significant difference in the _meaning_ and usage of the two words unrelated to their structure. 

Not that structure isn't important.
Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 23, 2022, 11:29:42 am
Correct. Use something that can be maintained from the start, not something that gives your customer headaches if something happens to you.
ALWAYS use industry standards. Firebird is not one of those.....
Hahaha, and FPC and Lazarus aren't industry standards either.
So by that logic... Stay away from FPC and Lazarus if you don't want to give your customers headaches if something happens to you  :D
I was referring to the data format, not in which language it coded. And you know that very well. >:D
Firebird has just not enough bindings in other languages compared to mainstream. It is a niche format, just like fpc is a niche compiler(maybe).
Just do not rely on such dubious formats. Your customer will be grateful. It is all about the data, not the compiler. And it is not reasonably maintained since 2014. (Know it is somewhat maintained since 2014, but still)
https://nl.wikipedia.org/wiki/Firebird_(database)
E.G: Embedded Sqlite is maintained and in many ways just better AND is THE standard.
But if you want evil, feel free to do evil....
If you don't, look at https://en.wikipedia.org/wiki/SQLite and shiver about its applications and OS's that support it out of the box.
Title: Re: A problem with Firebird Embedded 2.5
Post by: korba812 on July 23, 2022, 01:13:39 pm
Firebird has just not enough bindings in other languages compared to mainstream. It is a niche format, just like fpc is a niche compiler(maybe).
Any example?
Just do not rely on such dubious formats. Your customer will be grateful. It is all about the data, not the compiler. And it is not reasonably maintained since 2014. (Know it is somewhat maintained since 2014, but still)
https://nl.wikipedia.org/wiki/Firebird_(database)
E.G: Embedded Sqlite is maintained and in many ways just better AND is THE standard.
But if you want evil, feel free to do evil....
If you don't, look at https://en.wikipedia.org/wiki/SQLite and shiver about its applications and OS's that support it out of the box.
Rather, I would say that the Dutch wiki page has not been updated since 2014.
Title: Re: A problem with Firebird Embedded 2.5
Post by: rvk on July 23, 2022, 01:33:57 pm
https://nl.wikipedia.org/wiki/Firebird_(database)
Never use Dutch wiki for such information.
https://en.m.wikipedia.org/wiki/Firebird_(database_server)

If you only want embedded, then sure, go for SQLite.
If you want to go for a solid server, with an option for users to use an embedded version without server, SQLite isn't the correct choice. I'm not saying Firebird is the only choice but for the combination of being both embedded and server it's a much better choice than SQLite.

For the same reason users choose FPC (as a niche compiler) they can also choose for a niche database engine. Especially if it has the advantages they are looking for.


Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 23, 2022, 01:43:58 pm
So what advantages? There are none unless you believe in hype.
What I eventually have learned over the course of a 40 year career, make sure your third-party code is a standard. Firebird is not. Period. Especially with data you need to be very, very, very careful. Use Firebird for hobby projects? Fine, it is not bad, but absolutely not in a corporate environment (I am not even aware of any serious scale examples).
The wikipedia entry on Sqlite, or PostGress or Oracle or MySql/MariaDb tells it all.
If you want multi-user, use one of the big guns, so anyone can restore your data when your own software is obsoleted or worse: lost!
FireBird is bad advice. - Second - Period.
Title: Re: A problem with Firebird Embedded 2.5
Post by: rvk on July 23, 2022, 01:57:20 pm
If you want multi-user, use one of the big guns, so anyone can restore your data when your own software is obsoleted or worse: lost!
FireBird is bad advice. - Second - Period.
And if you become lost or obsolete as coder, it was a really bad choice to choose FPC because that's also not mean stream. So why would anyone choose FPC as programming choice?

Good for hobby but absolutely not in a corporate environment. Period  ;D
Same argument.
Title: Re: A problem with Firebird Embedded 2.5
Post by: dsiders on July 23, 2022, 04:52:35 pm
So, now that the thread has been hijacked...

Does the OP understand that they need an updated  version of the client library?
Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 23, 2022, 05:03:53 pm
If you want multi-user, use one of the big guns, so anyone can restore your data when your own software is obsoleted or worse: lost!
FireBird is bad advice. - Second - Period.
And if you become lost or obsolete as coder, it was a really bad choice to choose FPC because that's also not mean stream. So why would anyone choose FPC as programming choice?

Good for hobby but absolutely not in a corporate environment. Period  ;D
Same argument.
As I already wrote: the choice is about the database format and future maintainabilty, NOT about the compiler you use. In that case Firebird scores really bad on any decent manager's list. It is not a format for which programmers are easily available, so it introduces a risk, a point of future failure. I have seen lots of that in my 40 year career, both as a programmer as ICT manager. BAD CHOICE.
NOT bashing. FireBird is rather good, but future data protection requires a future proof and well known data format.
And the latter is the cause that I strongly discourage Firebird in commercial environments. It should be a  architect choice or ultimately a management choice and not left to programmers that support or defend it like it is a fetish. Putting your customer at avoidable risk is not a nice thing to do.
So the argument you make is the other way around and I am sure most professional programmers agree: Firebird is very good for hobby programmers, but not in a commercial setting.
Title: Re: A problem with Firebird Embedded 2.5
Post by: korba812 on July 23, 2022, 05:35:01 pm
Interestingly, Firebird has a longer history than most of databases you suggest. And since it has some popularity (obviously it's not in the top 10) and it's a project developed by foundation and community, I don't think the project will die any time soon.

But any tool should be selected according to the needs - do not use a sledgehammer to crack nuts.
Title: Re: A problem with Firebird Embedded 2.5
Post by: Thaddy on July 23, 2022, 05:58:00 pm
That is fake news: firebird dates from 2000, postgress from 1996, mysql from 1995 and sqlite is also from 2000.
Oracle even dates from 1979, well before interbase that dates from 1986, if we count firebird as a fork from interbase, which it isn't anymore due to a full rewrite.
Only Mariadb is newer, but that is also a fork just like firebird used to be.
For all of these counts that they are open source with liberate licenses except for oracle and to some extend mysql, which is owned by oracle.
TinyPortal © 2005-2018