Delphi 4 + multiusers program + interbase

Posted on 2007-08-10
Last Modified: 2013-11-23
I am making program on delphi4 , using paradox table.
Now I want to run this program under windows NT environment.
My question how can i make it multiusers program ? Should I first turn my paradox tables to interbase ? and how can i do that ?
and then what to do ? install interbase sever in one pc and put the database tables on it and put the interbase workstation on the other pcs ?
please some expert help me with this

thanks a lot.
Question by:ibrobar
    LVL 21

    Accepted Solution

     Wow, first download Delphi 2007 for free (or better yet, pony up the cash and get the professional - it is WELL worth it).  The tools have been upgraded A LOT since Delphi 4.  I was on Delphi 5 for a long time, but seeing all of the improvements it really pays to move up.

      Ok, now to your question.  Paradox can be a multi user database.  I would still move to a more modern database because you get many improvements in stability and usability.  When you move to Interbase (or MySQL, SQL Server, Oracle, etc) you do generally put the database on it's own system and connect to it from your client systems.  You will want the system uyou put the database server on to be a bit beefy both a fast processor and lots of ram... no real need for much of a video card.  Generally when I have had to do this kind of transfer I write a Delphi program to open my paradox table, generate the SQL to create it's matching table, and then do a loop like this (pseudo code).

    While not ParadoxTable.EOF do
        for I := 0 to ParadoxTable.Fields.Count - 1 do
          NewDBTable.Fields[I].Value := ParadoxTable.Fields[I].Value;

      You will want to examine how your tables work now though.  More modern databases give you a wide range of new abilities like IDENTITY columns, referential integrity options, and triggers.  Getting your data into the new database is one thing, really making use of the power of the new database is something else entirely.  I'm afraid I can't explain an entire database system in this text (expecially since I do not know which you have yet to choose).  I would get a few good books on SQL and the database of your choice.  And rememebr that for specific database questions you can always come back and ask at expertsexchange.
    LVL 21

    Expert Comment

    P.S.  On top of all of the other improvements in the IDE, etc you will also get Rave Reports with a purchase of Delphi.  I have used Crystal and find that Rave is easily as powerful and easier to use.

    Author Comment

    Thanks for answering me  / developmentguru / My program is very simple one , and i think the paradox will do fine with it.
    Now I download the program on the best and the strongest PC we have what should I do now.
    Should i download the program on other pc (we have 4 more) and if i did changes to the database how can i make it effect in the other pcs

    thanks a lot

    Author Comment

    sorry I forgot to ask you if Delphi 4 is compatible with windows Xp
    and where can i download Dlephi 7 for free

    LVL 21

    Expert Comment

    --My program is very simple one , and i think the paradox will do fine with it.--
      Most of the issues that paradox has with needing to rebuild indexes or tables is directly related to using it with multiple users.  If you are going from single user to multi... go ahead and try it.  If it is mostly accessed one at a time then you may be ok for a while.  

    --Now I download the program on the best and the strongest PC we have what should I do now.--
      Which program?  Interbase?  Go ahead and install it.  You will need to configure a service to run and set up a database on the service.  Interbase comes with a standard user name and password (i forget what they are, but I found them in the docs).  They should be changed as soon as you are confortable doing so, since they are easy to find.  Then you need to translate data from Paradox into Interbase.  Then you need to make your Delphi application look to the interbase server for it's data instead of paradox.  I believe there is a separate set of components.

      if on the other hand you meant your application then it needs to be on all the PCs you want to have run it.  They should all point to the Paradox table on the central box.

    -- if i did changes to the database how can i make it effect in the other pcs--
      I think that in order for a user on one PC to see changes made by another user you would just need to refresh your paradox data (TTable.Refresh / TQuery.Refresh).  Depending on how dynamic you want it to be you can call it on a timer every few minutes or so.  In many applications you have a form that display a particular type of records.  If that form is not always displayed it may be anough to refresh it when it is opened.  This is a design decision for you to make.

    Here is the link to download "Turbo Delphi Explorer"

    Let me know if you need more.

    Author Comment

    Hi again

    Yes I meant my application. I download it on all PCs . but by using paradox is there any way rather than refreshing the tables and query to make the changes appear on all PCs. and how can i make the application on all pcs point to the database in the central PC.

    LVL 21

    Expert Comment

     If you set up a a central service, that is the only program allowed to directly access the data, and have your client programs connect to it then the same service could notify the applications when something changes.  It would be far easier to just use a modern database.  some of the more modern databases are capable of generating events when something changes.  I have not needed to set it up personally, but I remember seeing the capability.

      As far as pointing all of the programs to the central PC that is normally done with the BDE setup utility.  If you need to be able to dynamically redirect them all, that is a trickier matter (one I have had to deal with recently).  My personal means of handling it was to create a simple SOA style solution where I could request the location and it would return the directory.  If each program requests the directory at startup then the directory can be changed in one location and the programs will adapt.

    I hope this helps
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now