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

x
?
Solved

Querying a dataset over a WAN

Posted on 1997-09-10
2
Medium Priority
?
186 Views
Last Modified: 2012-05-04
We are running D1 developer edition with paradox databases. We want to query our paradox (5.0) databases over a WAN pretty speedily (client-server?). Do we need ODBC/SQL links, C?s edition, 32 -bit Delphi? In other wors what are our options for achieving our goal? Thanks. Tom. [BTW, how do I get extra points so I can award this question more?]

After calls to Borland tech support we weren't provided with a satisfactory answer.
0
Comment
Question by:tomcorcoran
[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
2 Comments
 
LVL 1

Accepted Solution

by:
anilms earned 60 total points
ID: 1344604
1. The first thing you have to remember is that Paradox and Foxpro DBFs are not true C/S databases, ie., when you fire a query, the whole file comes to your computer where it is processed. Therefore you will have to simulate a server.

2. While it is very easy to do it using Delphi 3.0 with its support for ActiveX DLLs, the same can still be achieved using D1. We had a similar need as yours using DBF tables where the records used to run to a million sometimes. I will explain below how we managed to get satisfactory improvement in speed.

C - the central server which stores all the DBF files.
U - a user node some 40 kms away - a dial up link.
QDB - a query DBF on C - contains only two fields - QUERY c 150 and RESULT c 1. It is shared and can be accessed from U.
QDBP - a program written in delphi running on C. It has a timer and continously scans QDB for records in which RESULT is blank (which means a new query record has been added). It puts 'P' (Processing) in the RESULT field, picks up the QUERY string, processes it and creates a new DBF called QRESULT. It puts a 'O' in the RESULT field to indicate that the processing is over. The QUERY can be any valid SQL statement allowed for DBF files. QDBP also checks for RESULT = 'D' and deletes these records.

UPD - An user program in Delphi running on U which has to query C and the result could be a combination of two or more DBFs on C. The UDP constructs a query string and adds a QUERY record in QDB on C. Then it starts checking the RESULT for that QUERY in the QDB file itself (using a timer, of course). As soon as the RESULT turns to O, it picks up the QRESULT data and directly displays it in the DBGrid or whatever display component is needed. It also sets RESULT on QDB to 'D' so that the QFBP program can delete this.

UFP - Similar program on user node - running in Foxpro 2.5. Here, as we do not have a timer, we keep looping continously till the RESULT field turns to 'O' in the QDB DBF.

We have found that the following speed increases :
1. Only 1 DBF involved in query : 2-3 times
2. 2 or more DBFs : 7-8 times
The increase in speed is basically because the query is processed on the server and only the result is picked up from the QRESULT DBF.
0
 

Author Comment

by:tomcorcoran
ID: 1344605
Thanks for the response. There has to be a better system here, I would like more comments on this but grading an answer stops that right (the above did not deserve an F)?

So does sql links automate the above? Is it advisable to use them with D1 - tech support said we had to convert to 32 bit Delphi.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

730 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