Solved

BDE Callback for Paradox tables

Posted on 1997-10-05
2
719 Views
Last Modified: 2008-03-10
Anyone know how to use DbiRegisterCallBack to tell when a table has been edited?  I have Delphi applications that share a Paradox database on a network and I want each application running on a different machine to know when certain tables in the database are updated so I can update the application's display.  I only care about a few of the tables, not all of them.  I tried a dbiRegisterCallback and then went into Database Desktop and edited a record in a table and nothing happend.  Here is the code of my test application:

{Our callback  function}
function DbiCbFn(ecbType     : CBType;
                 iClientData : Longint;
                 CbInfo      : pointer): CBRType stdcall;
var
  s : string;
begin
  showmessage('Callback succeeded!');
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
 {Make sure the table we are moving from is open}
  Table1.Open;
 {register our callback}
  DbiRegisterCallBack(table1.handle,
                      cbTABLECHANGED,
                      0,
                      0,
                      nil,
                      @DbiCbFn);


end;

Note: I am using Delphi 2 with BDE 3.5 for this application.
I can upgrade to BDE 4.0 if necessary but not Delphi 3.
0
Comment
Question by:pswenson
[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
 

Author Comment

by:pswenson
ID: 1346851
Adjusted points to 75
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 70 total points
ID: 1346852
Borland has an example of this.

piece of support page :

Example 2: Register the cbTABLECHAGNED callback for notification when a Paradox table's data has changed

This example is too complicated to be shown here. A sample Delphi registration component with an example is available that will do all the registration work for you. Simply install the new TTable component (TRegisterTable in RegisterTable.pas) and compile the included project. This component will work with all table types, but will only use the callback with Paradox table types.

You can go to this page:

http://www.borland.com/devsupport/bde/bdeapiex/dbiregistercallback.html

Or you can download the example zip-file from :

http://www.borland.com/devsupport/bde/files/tablechanged.zip

Have fun,
c.u. ZifNab;
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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