Solved

BDE Callback for Paradox tables

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 304
TVirtualStringTree  search using TEdit 7 121
Delphi TcxGrid group footer summary 3 275
find a node in VST 2 69
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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