Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert Standalone Delphi/Dbase IV to Network version

Posted on 2008-06-16
6
Medium Priority
?
843 Views
Last Modified: 2013-11-24
Hi All,
Greetings!

The task is to convert a Delphi (version 5) Dbase IV  Standalone application to Client Server without spending a single penny for the conversion.  The Delphi application uses BDE, TTable and TQuery. TTable is used extensively to navigate, edit data and also to handle indexes(AddIndex, DeleteIndex).

Suggested solution:

1. Put the database (DBF and MDX files) in a shared directory in the system meant as Server
2. Install BDE in all the client systems and point the Alias path to the shared directory on Server. Also we have to configure the BDE (things like Local Share = true, use same IDAPI32 and so on..)
This should make the application client-server type.

Following issues have to be considered:
1. How to handle the table/row locking in a Multiuser environment in a smooth manner?
2. The current code applies a Exclusive table lock before Deleting/Adding Indexes?

To handle the locking problems, I have thought of using the CLientDateSet-Provider combination (along with the famous reconcile error dialog) for each TTable and TQuery.

But, the real problems are creeping up only when I try to use the CLientDataSet instead of TTable.
For example the tTable.AddIndex/DeleteIndex - will it work from a ClientDataSet ?
Is it not related to the physical DBF file?
Is the Add/Delete index really requried since a single  MDX file can hold a lot of indexes?
Is the Exclusive lock in this case really neccesary (it seems so)?
If we leave the tTable as it is for handling Index alone, what will happen when a Exclusive lock is applied for adding/deleting indexes in a multiuser environment?

Actullay, I did consider using CachedUpdates first. But, the help itself seems to recommend the CLientdataset-provider model. Should I retrace my steps and settle for CachedUpdates instead of Clientdataset? (Then I hope I do not have to bother about index handling code. But, I will have to forget the beautiful reconcile dialog (: in the bargain)

I have all these troubling questions and I am lost.

Any help and guidance is most welcome....(and I am running of time)



0
Comment
Question by:hariweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21797007
impossible !!!
why ?
simply explained with : time is money.
someone is going to spend time on this issue in a production environment.
someone wants to get paid for his/her time.

even installing the tool i created once for just that and hitting that single button "GO"
takes 20 min to install + some time to let it run.


0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21797025
Besides that you should really consider a RDBMS like MSSQL, Oracle, Firebird, MySQL, ...
0
 
LVL 18

Assisted Solution

by:Johnjces
Johnjces earned 600 total points
ID: 21797803
As I recall in the BDE, when you have sharing := true, the BDE tries to handle the file and record locking.

Many years ago when I used the BDE for dbase files, it did a fine job of handling multiple users, albeit not that many, so I cannot state for certain any numbers.

Yes, there will be time involved in setting up your lcient and getting the share setup, but I, and with all due respect, disagree with Geert_Gruwez as it is not impossible.

I do concur that moving up and IMHO moving to ADO and a good SQL database management system, would be the way to go. But then that could mean a lot of code changes and more time.

If you still want multi-user access to dBase files, I believe that tDBF can do that. It si free and OpenSource. Have a look at...

http://tdbf.sourceforge.net/

might help.

As far as you other questions.... I have no answers. I think a test environment and trial and error might be the way to go!

john
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 1

Author Comment

by:hariweb
ID: 21799657
Hi All,

Greetings!

Thanks very much for your inputs.

 I already suggested moving to other RDBMS. But, the customer does not agree for fear of lot of changes, migration etc. So, I am forced to get along with Dbase.

Johnjces, your comments are encouraging.  I will look into tDBF and get back.


Hari
0
 
LVL 38

Accepted Solution

by:
Geert Gruwez earned 900 total points
ID: 21800140
The customer is not allways right.
I may have put it harsh, but that's the way it is.

What I am reading is that your customer doesn't want to pay for something good.

Let me sum up some problems I used to have and the solution we created:
Corrupt indexes ->  Rebuilding the indexes every night.
Network administrator cleaning the server harddrive, even deleting the .dbf files -> Backup every night.
Corrupt tables -> use the backup
Multi user lock -> lock file
Locked records -> Use phone and tell the other user to get out, or use UDP to send message with timeout
Virusscanner deleting the files -> Virusscanner setting

New problems with rdbms
Good installation by a DBA -> costly -> but saves the hassle of learning the install
Do it yourself -> cheap -> but takes times -> apparantly you don't have much

Good things:
MSSQL
comes with a data import tool
specify directory -> hit import -> done
cost : for desktop engine -> free
Nearly impossible to delete anything of files (unless the engine is stopped).

Interbase
Comes with Delphi
Easy to learn

Oracle
Difficult to install -> As From version 10 has an easier install
Vast set of functions and procedures.

Where you go is up to you ...
But your customer should be paying for any conversion you do... your time has a price.
Unless you are allready on his/her payroll
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 21800153
Oh yeah, I forgot: we didn't really have a solution for this one:
Backups were done on tape.  
Tapes were stored next to the server.
Everything in the server room got stolen (even the tapes).

Solution:
Put an add in the paper to return a recent tape or a harddrive ...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi databaseā€¦
The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calculā€¦

670 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