Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-07

Firebird connection

9 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alex du Plessis

Hi All,

I tried connecting to a Firebird database using the TIBConnection component from the sqldb tab in the IDE. The TIBConnection as well as the TSQLTransaction connects with no hiccups in the IDE. I then created a TSQLQuery to select all fields from a table in the database and display it in a TDBGrid via a TDatasource.

However, when trying to activate the query (both in the IDE and at runtime) it refuses to activate but also does not return with an error message.

Does anybody have any ideas where I'm going wrong?

Thanx
Alex

Reply by email

Graeme Geldenhuys
to Alex du Plessis

2008/7/2 Alex du Plessis :

Show quoted text 5 lines
However, when trying to activate the query (both in the IDE and at runtime) it refuses to activate but also does not return with an error message. Does anybody have any ideas where I'm going wrong?

I remember having similar issues a while back. What properties are you setting up in the TSQLQuery? I remember I had to set multiple properties (which seemed redundent to me) before it would work. I don't know if that has changed in FPC 2.2.0 and 2.2.2.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Alex du Plessis
to Graeme Geldenhuys
Graeme Geldenhuys wrote 19 lines
2008/7/2 Alex du Plessis : > However, when trying to activate the query (both in the IDE and at > runtime) it refuses to activate but also does not return with an error > message. > > Does anybody have any ideas where I'm going wrong? > I remember having similar issues a while back. What properties are you setting up in the TSQLQuery? I remember I had to set multiple properties (which seemed redundent to me) before it would work. I don't know if that has changed in FPC 2.2.0 and 2.2.2. Regards, - Graeme -

I only changed the database,transaction and sql string properties. However, from the CCR document pages I got the address of FBLib Firebird library, downloaded and installed that.(It was necessary to comment out 1 line as a quick resolution, in order to get the package to compile). That worked without any hiccups. Maybe that's the route to go with Firebird?

Regards
Alex

Reply by email

Graeme Geldenhuys
to Alex du Plessis

2008/7/2 Alex du Plessis :

Show quoted text 6 lines
> I only changed the database,transaction and sql string properties. However, from the CCR document pages I got the address of FBLib Firebird library, downloaded and installed that.(It was necessary to comment out 1 line as a quick resolution, in order to get the package to compile). That worked without any hiccups.

That's exactly what I did in the end. :-)

Maybe that's the route to go with Firebird?

At the moment (well, for the last two years now) we only use FBLib. The original author is nowhere to be found, so I started maintaining or rather fixing the issues we deteced. For our latest FBLib, you can get a update from tiOPF's project on SourceForge.net.

svn co https://tiopf.svn.sourceforge.net/svnroot/tiopf/3rdParty/FBLib/Trunk FBLib

I tagged the original version of FBLib as well, so it's easy to get a difference between the original and ours - if you wanted to see what we fixed.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Alex du Plessis: I only changed the database,transaction and sql string properties. However, from the CCR…

2008/7/2 Alex du Plessis :

Show quoted text 6 lines
I only changed the database,transaction and sql string properties. However, from the CCR document pages I got the address of FBLib Firebird library, downloaded and installed that.(It was necessary to comment out 1 line as a quick resolution, in order to get the package to compile). That worked without any hiccups. Maybe that's the route to go with Firebird?

Here is the thread I was talking about. My experience with SqlDB. As I mentioned, it was prior to FPC 2.2 release, so things might have improved now.

http://thread.gmane.org/gmane.comp.ide.lazarus.general/20563

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 12 lines
2008/7/2 Alex du Plessis : > I only changed the database,transaction and sql string properties. > However, from the CCR document pages I got the address of FBLib Firebird > library, downloaded and installed that.(It was necessary to comment out > 1 line as a quick resolution, in order to get the package to compile). > That worked without any hiccups. Maybe that's the route to go with > Firebird? Here is the thread I was talking about. My experience with SqlDB. As I mentioned, it was prior to FPC 2.2 release, so things might have improved now.

Your error was setting the TSQLQuery.Datasource property. This should NOT be done, unless you wish to establish a master/detail relation between 2 TSQLQuery classes.

Michael.

Reply by email

Michael Van Canneyt
to Alex du Plessis: I only changed the database,transaction and sql string properties. However, from the CCR…
Alex du Plessis wrote 26 lines
Graeme Geldenhuys wrote: > 2008/7/2 Alex du Plessis : > >> However, when trying to activate the query (both in the IDE and at >> runtime) it refuses to activate but also does not return with an error >> message. >> >> Does anybody have any ideas where I'm going wrong? >> > > I remember having similar issues a while back. What properties are you > setting up in the TSQLQuery? I remember I had to set multiple > properties (which seemed redundent to me) before it would work. I > don't know if that has changed in FPC 2.2.0 and 2.2.2. > > > Regards, > - Graeme - > > I only changed the database,transaction and sql string properties. However, from the CCR document pages I got the address of FBLib Firebird library, downloaded and installed that.(It was necessary to comment out 1 line as a quick resolution, in order to get the package to compile). That worked without any hiccups. Maybe that's the route to go with Firebird?

SQLDb works fine. I just did the steps, and it works like a charm ?

See

http://wiki.freepascal.org/SQLdb_Package
http://wiki.freepascal.org/Working_With_TSQLQuery

The process is fairly documented.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: Your error was setting the TSQLQuery.Datasource property. This should NOT be done, unless…

2008/7/2 Michael Van Canneyt :

Your error was setting the TSQLQuery.Datasource property. This should NOT be done, unless you wish to establish a master/detail relation between 2 TSQLQuery classes.

Just tried again, and this time I got it working fine. :-)

BTW:
I'll report this as a bug, but the TIBConnection.Database property editor which enables you to select a local database, only has support for *.gdb or *.fb database. I couldn't select my database which had a *.fdb extension. The property editor should at least have a *.* option.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Alex du Plessis
to Michael Van Canneyt: Your error was setting the TSQLQuery.Datasource property. This should NOT be done, unless…
Michael Van Canneyt wrote 23 lines
On Wed, 2 Jul 2008, Graeme Geldenhuys wrote: > 2008/7/2 Alex du Plessis : > >> I only changed the database,transaction and sql string properties. >> However, from the CCR document pages I got the address of FBLib Firebird >> library, downloaded and installed that.(It was necessary to comment out >> 1 line as a quick resolution, in order to get the package to compile). >> That worked without any hiccups. Maybe that's the route to go with >> Firebird? >> > Here is the thread I was talking about. My experience with SqlDB. As I > mentioned, it was prior to FPC 2.2 release, so things might have > improved now. > Your error was setting the TSQLQuery.Datasource property. This should NOT be done, unless you wish to establish a master/detail relation between 2 TSQLQuery classes. Michael.

Thanx Michael = I'll try that right now

Reply by email