Recent

Author Topic: SQLDB Client Server (not Multi-tier) for Dummies  (Read 3736 times)

DeBritto

  • Jr. Member
  • **
  • Posts: 68
SQLDB Client Server (not Multi-tier) for Dummies
« on: January 04, 2017, 01:28:28 pm »
Hi everyone,
First Happy 2017!

I desperately need some code samples that show how to use lazarus free pascal with the native SQL DB component to build a client/server application. I'm using firebird 3. I need code samples that show how to start, manage, lock, refresh transactions in a most simple way. Serious, in a most simplest and direct way. I think that this must be a basic procedures but I did not figure out yet. Sorry... :(

I don't need to use complex libraries like Indy, just need to know the basics of transaction, record loking and so on.. ;)
« Last Edit: January 04, 2017, 04:01:54 pm by DeBritto »

Thaddy

  • Hero Member
  • *****
  • Posts: 14359
  • Sensorship about opinions does not belong here.
Re: SQLDB Client Server for Dummies
« Reply #1 on: January 04, 2017, 01:38:40 pm »
Google on it: any old Delphi code should work.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

DeBritto

  • Jr. Member
  • **
  • Posts: 68
Re: SQLDB Client Server for Dummies
« Reply #2 on: January 04, 2017, 01:50:03 pm »
I have tried, but didn't found :(

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: SQLDB Client Server for Dummies
« Reply #3 on: January 04, 2017, 02:12:03 pm »
I have tried, but didn't found :(

Start here https://www.devarticles.com/c/a/Delphi-Kylix/A-Real-World-Client-Server-Application-in-Delphi/.
 
It uses the old Indy 9 (you'll need to modify it to work with Indy 10) and there is no database on the server end but it is the simplest example I know of. Adding a Firebird database to the server end and running queries on the server will make it a client server DB application similar to what you are looking for.

JD

Another one https://sourceforge.net/projects/indy10clieservr/
« Last Edit: January 04, 2017, 02:19:00 pm by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

rvk

  • Hero Member
  • *****
  • Posts: 6162
Re: SQLDB Client Server for Dummies
« Reply #4 on: January 04, 2017, 02:19:57 pm »
Indy ???

The first question to DeBritto would be what (s)he understands under Client/Server.
If this is for communication over the internet then creating a multi-tier application is advisable.

If it's just for creating an app on the internal network then you need to determine which DBComponents are going to be used (Zeos, DBConnection, IBX or other).

But for an internal network you don't need to add the complexity of Indy and/or multi-tier programming.

(I don't think DeBritto is after guidelines for multi-tier programming)

DeBritto

  • Jr. Member
  • **
  • Posts: 68
Re: SQLDB Client Server (not Multi-tier) for Dummies
« Reply #5 on: January 04, 2017, 04:03:54 pm »
Hy rvk, you're right. I don't need guidelines for multi-tier programming. Just transaction control, record locking and so on. To use in an internal network.  I'm using the standard Lazarus SQLDb component with Firebird 3.0.

Can you help me?


 

TinyPortal © 2005-2018