Solved

sql in a net application

Posted on 1998-09-24
4
130 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

18 Experts available now in Live!

Get 1:1 Help Now