SQL Server and refresh 
Author Message
 SQL Server and refresh

Hello!

When we're using Delphi 5 Enterprise to connect to SQL Server, we're
having problems. We're unable to call refresh on a table/query
component, it says 'not indexed' or something. The effects of this is
obvious. When we append or change a record, that record disappears
forever until we close and reopen. When using a simple DBGrid, new
records simply disappear once we post them. Please help us out!
Preferrably by direct email, since we're not able to check the news
that often.

Best regards,
  Christian Tiberg

Sent via Deja.com http://www.***.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 SQL Server and refresh

Use:

procedure RefreshDataSet(const DataSet: TDataSet);
var
  B: TBookmark;
begin
  DataSet.DisableControls;
  try
    B := DataSet.GetBookmark;
    try
      DataSet.Close;
      DataSet.Open;
      try
        DataSet.GotoBookmark(B);
      except
        // record has been deleted by somebody else
      end;
    finally
      DataSet.FreeBookmark(B);
    end;
  finally
    DataSet.EnableControls;
  end;
end;


Quote:
> Hello!

> When we're using Delphi 5 Enterprise to connect to SQL Server, we're
> having problems. We're unable to call refresh on a table/query
> component, it says 'not indexed' or something. The effects of this is
> obvious. When we append or change a record, that record disappears
> forever until we close and reopen. When using a simple DBGrid, new
> records simply disappear once we post them. Please help us out!
> Preferrably by direct email, since we're not able to check the news
> that often.

> Best regards,
>   Christian Tiberg

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 SQL Server and refresh
Hello!

Hmm... That seems a little odd.. I asked for a way to make it work in a
DBGrid, and that doesn't seem to be the case with your solution. Also,
it would indeed be nice to have a way to know when other users post
something. Please help!

Christian Tiberg



Quote:
> Use:

> procedure RefreshDataSet(const DataSet: TDataSet);
> var
>   B: TBookmark;
> begin
>   DataSet.DisableControls;
>   try
>     B := DataSet.GetBookmark;
>     try
>       DataSet.Close;
>       DataSet.Open;
>       try
>         DataSet.GotoBookmark(B);
>       except
>         // record has been deleted by somebody else
>       end;
>     finally
>       DataSet.FreeBookmark(B);
>     end;
>   finally
>     DataSet.EnableControls;
>   end;
> end;




- Show quoted text -

Quote:
> > Hello!

> > When we're using Delphi 5 Enterprise to connect to SQL Server, we're
> > having problems. We're unable to call refresh on a table/query
> > component, it says 'not indexed' or something. The effects of this
is
> > obvious. When we append or change a record, that record disappears
> > forever until we close and reopen. When using a simple DBGrid, new
> > records simply disappear once we post them. Please help us out!
> > Preferrably by direct email, since we're not able to check the news
> > that often.

> > Best regards,
> >   Christian Tiberg

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT
 SQL Server and refresh
Have you tried creating a unique index/primary key on the table?
Quote:

> Hello!

> When we're using Delphi 5 Enterprise to connect to SQL Server, we're
> having problems. We're unable to call refresh on a table/query
> component, it says 'not indexed' or something. The effects of this is
> obvious. When we append or change a record, that record disappears
> forever until we close and reopen. When using a simple DBGrid, new
> records simply disappear once we post them. Please help us out!
> Preferrably by direct email, since we're not able to check the news
> that often.

> Best regards,
>   Christian Tiberg

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 SQL Server and refresh
Am having the same problem.  Have you found an answer yet - the thread
seems to have dried up?

Sent via Deja.com http://www.deja.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Forcing SQL Server to refresh system date

2. ATTENTION: SQL Server CE Refresh is now available

3. SQL Server does not immediately refresh a linked ODBC server when the DNS is changed

4. Refresh with MS SQL Server 7.0, Access project

5. ADO/SQL Server Refresh - NT (Bug?)

6. URGENT ! SQL Server connect and Refresh

7. SQL Server CE SP1 Refreshed with support for Windows CE .NET

8. Refresh SQL Server 6.5 DB with different UIDs

9. SQL Server 7 stored procedure, sp_runwebtask, from VBSCRIPT using ADO...Parametres.REFRESH problem

10. Refresh query on SQL server

11. Problem refreshing SQL Server 7.0 joins in ADO

12. Refreshing an asp page using Sql server


 
Powered by phpBB® Forum Software