Posts

Showing posts with the label Firebird

How to Insert/Edit Rows in Firebird Dataset in Delphi using FIBPLUS Components?

How to Insert/Edit Rows in Firebird Dataset in Delphi using FIBPLUS Components? You can insert a row and edit an existing row in firebird dataset in Delphi. I will use FIBPLUS dataset component in Delphi XE4. Just use Insert and Edit procedures for this purpose. First of all create a dataset of type TpFIBDataset. Lets have a look at this very simple example. var dsMyFirebirdDataset : TpFIBDataset; Insert a row in a dataset with dsMyFirebirdDataset do begin Insert; dsMyFirebirdDatasetID.AsInteger := 101; dsMyFirebirdDatasetDESC.AsString := 'Hello'; Post; end; You can also use FieldByName like following: with dsMyFirebirdDataset do begin Insert; FieldByName('ID').AsInteger := 101; FieldByName('DESC').AsString := 'Hello'; Post; end; Similarly, you can edit a record/row in the dataset like following: Edit a row in a dataset With dsMyFirebirdDataset do begin Edit; dsHdwPriceGroupDESC.AsString := 'Hello World'; Post; end; or With ...

How to populate data into dataset from Firebird database in Delphi using FIBPLUS components?

How to populate data into dataset from Firebird database in Delphi using FIBPLUS components? I am using Firebird 2.5.2 database and Delphi XE4. I will be using FIBPlus TpFIBDatabase and TpFIBDataset components to populate data from Firebird database to dataset in Delphi XE4. For this, you have to drag TpFIBDatabase and TpFIBDataset components into your Delphi Form from the Tool Palette. Set various properties of TpFIBDatabase component like DBName, Username, Password and LibraryName to connect to Firebird database. I have written a complete tutorial on this. After successfully creating the database connection, set following properties of TpFIBDataset component: Database : Provide the name of database component (TpFIBDatabase) in Database property. In my case, I have created dbMyDatabase component in my previous article . SQLs : Write the query which you want to run. In my case, I am running following query: SELECT ID, NAME FROM MY_FIREBIRD_TABLE WHERE ID = :ID AND NAME = :NAME; Now, p...

How to create database connection with Firebird in Delphi using FIBPLUS components?

How to create database connection with Firebird in Delphi using FIBPLUS components? I am using Firebird 2.5.2 with Delphi XE4. I will show you how to create a database connection with Firebird database in Delphi XE4 using FIBPLUS component? Just go into the Tool Palette and search for TpFIBDatabase component under FIBPLUS. Drag it into the form and name it. I have given "dbMyDatabase" name to TpFIBDatabase database component. If you see your pas file, a declaration for TpFIBDatabase will look like this: var dbMyDatabase: TpFIBDatabase; Now create a function "ConnectToDatabae" with return type boolean. This function will return true if Firebird database connection is established successfully otherwise false. function TMyForm.ConnectToDatabase : boolean;  begin   result := False;   try     try       with dbMyDatabase do      begin         DBName := 'C:\MyProject\MyDB.FDB'; ConnectParams . UserName := 'S...

21 Best Free Open Source Databases

21 Best Free Open Source Databases As a developer or DBA, you must be using some of the widely used databases like MS SQL Server, MySQL, Oracle, PostgreSQL, MongoDB etc. MySQL is the best free open source database which is used today, that we all know. Beside MySQL there are a lot of free and open source databases which you might not be knowing or never used. Some of the free free and open source databases are PostgreSQL, MongoDB, HBase, Cassandra, Couchbase, Neo4j, Riak, Redis, Firebird and lot more. I am using Firebird in my current project which with Delphi XE4. I have compiled a list of 21 Best, Free and Open Source Databases available to us. Lets have a look at them: 1. MySQL The most widely used open source database for Web apps (and many other things) remains MySQL. Support for multiple storage engines, clustering, full-text indexing, and plenty of other professional features have allowed numerous other apps profiled here, from WordPress to Movable Type, to rely on MySQL as thei...

How to use TpFIBDataSet, TpFIBQuery and TpFIBTransaction FIBPlus components to connect with Firebird / Interebase database in Delphi XE4?

How to use TpFIBDataSet, TpFIBQuery and TpFIBTransaction FIBPlus components to connect with Firebird / Interebase database in Delphi XE4? Following is the basic article on Firebird / Interbase database connectivity in Delphi XE4 using FIBPlus database components like TpFIBDataSet, TpFIBQuery and TpFIBTransaction. I will explain all these FIBPlus database components in detail. I have written a small article on TpFIBDatabase before this article. Please go through that before reading this one. Read FIBPlus TpFIBDatabase... FIBPlus TpFIBQuery Component An application works with a database by issuing SQL instructions. They are used to get and modify data\metadata. FIBPlus has a special TpFIBQuery component responsible for SQL operator execution. This robust, light and powerful component can perform any actions with the database.  TpFIBQuery is very easy-to-use: just set the TpFIBDatabase component, fill in the SQL property and call any ExecQuery method (ExecQueryWP, ExecQueryWPS). ...

How to use TpFIBDatabase FIBPlus Component to connect with Firebird database in Delphi XE4?

How to use TpFIBDatabase FIBPlus Component to connect with Firebird database in Delphi XE4? TpFIBDatabase component is used to make database connectivity with Firebird database in Delphi. For using TpFIBDatabase component, you should have FIBPlus and Firebird installed on your system. I am using Delphi XE4, Firebird 2.5.2 and FIBPlus 7.5 to make database connection. Connection parameters are typical for InterBase/Firebird server: 1) path to a database file; 2) user name and password; 3) user role; 4) charset; 5) dialect; 6) client library (gds32.dll for InterBase and fbclient.dll for Firebird). To connect to a database you should call the Open method or set the Connected property to True. It’s also possible to use this code to connect to a database: function Login(DataBase: TpFIBDatabase; dbpath, uname, upass, urole: string): Boolean; begin  if DataBase.Connected then DataBase.Connected := False;   with FDataBase.ConnectParams do begin    UserName := uname; ...