Solved

sql in a net application

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best Firemonkey component pack 1 105
Internet Explorer View Settings Question 15 111
TEMBEDDEDWB how can i change its user agent ? 8 58
Breakpoint doesn't stop in my variable 3 28
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 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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

777 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