Showing posts with label lazarus. Show all posts
Showing posts with label lazarus. Show all posts

Sunday, November 11, 2012

Using Lazarus IDE with Firebird in Ubuntu and Debian

Install the ide
sudo apt-get install lazarus-ide
Start the ide from the console/terminal

 lazarus-ide &
If everything went well you'll see a new tab called SQLdb. This tab will contain two components a TSQLConnection and a TSQLQuery.








SQLdb tab also contains a component TIBConnection that you can place it on the form


We will connect to /var/lib/firebird/2.5/data/employee.fdb
On the form put an TIBConnection, TSQLTransaction,TSQLQuery,TDatasource and an TDBGrid









TIBConnection is configured to have DatabaseName=/var/lib/firebird/2.5/data/employee.fdb
Password=masterkey
Username=sysdba
and Transaction=SQLTransaction1
You can put it to be Connected = True




Then configure SQLTransaction1
to use

Database=IBConnection1
Active =True;




Configure TSQLQuery this way

Database:IBConnection1
SQL=select * from employee;
Active = True;








Configure TDatasource
DataSet=SQLQuery1



Configure TDBGrid

DataSource = DataSource1




Next you can put an button and make them active from run time


procedure TForm1.Button1Click(Sender: TObject);
begin
SQLQuery1.Active:=true;
end;









Saturday, November 01, 2008

This post is about an interview with Ales Katona (also known as Almindor) - A contributor to FPC, Lazarus and have few of his own open source projects as well such as Lentilwars and lnet. I have asked Ales to have an interview with me regarding the open source projects and some information about himself, and I hope you all find it interesting as I have.

Wednesday, October 22, 2008

Frames in Lazarus

If you miss the Delphi frames now you can use them in Lazarus too if you are doing Delphi/pascal style programming

http://wiki.lazarus.freepascal.org/IDE_Development#Working_3

Tuesday, October 21, 2008

Delphi/Free Pascal could be 2008 Language of the Year

It seems that Delphi Programming is an popular thing
and we must push it more (Delphi + Firebird)

http://www.delphi.org/2008/10/delphi-language-of-the-year-2008/
check the tiobe

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

I wonder when i will start an kernel module in pascal :)
imagine some kernel components on the components panel

Saturday, October 18, 2008

Howto use Lazarus 0.9.26 in Ubuntu Hardy/Intrepid
You can install the new version and you don't need to wait another 6 months to be included
in next Ubuntu release
if you have an "old" stable lazarus 0.9.24
you can install/upgrade to latest stable by using
the official lazarus repository

In my case i created an getlazarus bash script with this content


#!/bin/sh
gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F
gpg --export 6A11800F | apt-key add -
echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \
>/etc/apt/sources.list.d/lazarus.list
apt-get update
apt-get install lazarus


then
$chmod +x getlazarus
$sudo ./getlazarus

also you must be sure to have te fpc source so here is how i usually install

sudo apt-get install fp-units-db fp-units-gfx fp-units-gnome1 fp-units-misc fp-units-net fpc-source fp-compiler fp-docs fp-utils lazarus



then start it with
$lazarus-ide in console or from the menu
Applications -> Programming -> Lazarus




To update all free pascal related packages from the new repository (I had old fpc2.2.0 and lazarus from intrepid repository)

$sudo apt-get dist-upgrade

In my case I got this message

The following packages will be upgraded:
fp-compiler fp-docs fp-ide fp-units-base fp-units-db fp-units-fcl
fp-units-fv fp-units-gfx fp-units-gnome1 fp-units-gtk fp-units-gtk2
fp-units-misc fp-units-multimedia fp-units-net fp-units-rtl fp-utils fpc
fpc-source lazarus-doc lazarus-ide lazarus-src



What is next ? Try to use it with firebird

And seems that works without problems.

Saturday, June 28, 2008

"I am absolutely sure that Gtk is the worse GUI toolkit I have ever seen. Yes, even worse then direct Windows API, because at least the Windows API works!"

So one more thing to hate gnome bloatware

read this blog

"The final feature, which would make Lazarus finally ready for 1.0 (just my opinion! I know others disagree) is unfortunately not in this list. It would be the retirement of the Gtk 1 widgetset, and the move to a fully unicode and modern Linux Toolkit. I have worked a lot in the Gtk 2 widgetset, trying to get it to a development level where it could substitute Gtk 1, but I got really frustrated, partly because of the low quality of the mixed gtk1/gtk2 interface code, but also because Gtk just doesn't help. Having worked with the Windows API, Qt, fpGUI, Cocoa and Gtk, I am absolutely sure that Gtk is the worse GUI toolkit I have ever seen. Yes, even worse then direct Windows API, because at least the Windows API works!"

Friday, June 20, 2008

So here is a novice's guide to installing Lazarus and getting it to use gtk2.

Tuesday, January 29, 2008

thinking loudly - FreePascal and Fastcgi

Morfik is precompiling the application into an cgi using pascal (fpc)
I was thinking what if the fastcgi can be used to run an pascal program precompiled with lazarus(fpc)


The main issue is that main scripting languages migrate to fastcgi: php , python, perl
and light httpd servers (nginix,lighttpd,apache+fastcgi module)

Why they migrate ? because apache threading doesn't work for scripts and we are back to cgi and share nothing architecture (kiss philosophy )