Solved

BDE Callback for Paradox tables

Posted on 1997-10-05
2
709 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

23 Experts available now in Live!

Get 1:1 Help Now