Solved

sql in a net application

Posted on 1998-09-24
4
137 Views
Last Modified: 2010-04-03
I've made a net application and I have a problem when I perform an update on a sql dataset. I'm going to explain an example, if I delete a record of a table, all data in computers refreshes, but if I delete a record of a query, the data in other computers doesn't refreshes although I close and open the query. How can I refresh the data in the
sql of others computers?
0
Comment
Question by:girona
[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 Comments
 
LVL 1

Expert Comment

by:EmmDieh
ID: 1340803
What Server do you use ?
Check your transaction isolation (repeatable read).
0
 

Author Comment

by:girona
ID: 1340804
I'm ussing Windows NT to contain the DataBase and run the application
0
 

Expert Comment

by:Mariner080498
ID: 1340805
Do you use COMMIT(POST)  method of the TQuery commponent?
Try.
0
 
LVL 10

Accepted Solution

by:
Jacco earned 50 total points
ID: 1340806
I know the problem. We have found the following solution for the problem:

function RefreshLocate(
        ADataSet : TDataSet;
  const KeyFields : String;
        KeyValues : Variant;
        Options : TLocateOptions) : Boolean;
begin
  with ADataSet do begin
    if not Active then Open;
    if not Locate(KeyFields,KeyValues,Options) then begin
      Close;
      Open;
      Result := Locate(KeyFields,KeyValues,Options);
    end else begin
      dbiForceRecordReread(Handle,ActiveBuffer);
      Result := True;
    end;
  end;
end;

We use this in stead of a locate.

And the following was also necessary:

  with dmDataModule.MainDataBase do begin
    StartTransaction;
    Commit;
  end;

We use the TIBEventAlerter to signal the database client when records are updated. The problem was the the changes were'nt reflected on other workstations. With this code before you try to reread your data you should be OK.

Regards Jacco
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

728 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