Solved

Delphi 3 refreshing Query

Posted on 1998-01-09
2
186 Views
Last Modified: 2012-05-04
I want to know how to refresh a single record on a query already prepared and executed. When executing the query.refresh I get the error : "Index not unique"
The database I am working with is MS SQL Server.
0
Comment
Question by:MONROE
2 Comments
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 60 total points
ID: 1356006
Monroe,

  You can't really refresh just a single record unless the query only returns that one record. The Index Not Unique error is coming up because Delphi needs a unique index on the tables it accesses in order to be able to tell which one it was updating.

Go to the table and prepare a unique index and let your app know what it is. Should solve the problem.

Good luck on your project!
Pegasus
0
 

Author Comment

by:MONROE
ID: 1356007
Perhaps I have forgotten something but On the MS SQL Server Entreprise Manager, I have set my tables with a unique index and on Delphi I have tried a simple program with a query, a DBNavigator and a DBGrid connected with a datasource. The result on pressing the refresh button of the DBNavigator was this error "Cannot refresh this table because there is no unique index". Am I obliged to put only a Table component to use this refresh utility. Why is it so accessible for queries? Or what must I do to do it works? You say : Let your app know what it is => I don't know how...

0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 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