Category Archives: Beginner

Accessing Databases (Main Article)

This demo will be divided in a Server and a Client.

Basically, we are going to be serving several queries to the clients from a server. To accomplish this, we will be using a database created with SQLite. SQLite is an awesome SQL Server embedded that can be easily used in Delphi. To make the connection to the database we are going to use ZeosDB components, they are open source and stable. For all the communication, of course, we will be using RTC SDK components.

So, let’s go ahead. Choose your destiny:

  1. The Server.
  2. The Client.

Accessing Databases (Server side)

The Server.

This demo will show how really simple is to create a server that can send the content of tables in a database to a client.

Steps.

  1. Create a new project in Delphi 7
  2. Create a DataModule to connect to Database and send responses back to the client
  3. Create a Form to control the Server.
  4. Compile and run the Server. Continue reading

Accessing Databases (Client side)

The Client

This is the article for the client in the Accessing Databases article. At this moment, we have our Server ready, so now it’s time to create the Client that will ask for the data. In this case, this client is really simple, in fact, as simple as it could be. This Client will call a function on the Server and get back the content of the table tbl_products in our Server’s database.

Steps.

  1. Create a form for the Client with the needed components.
  2. Write the code to  call the Remote Function. Continue reading