[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

sql in a net application

Posted on 1998-09-24
4
Medium Priority
?
139 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 100 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

650 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