Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delphi 3 refreshing Query

Posted on 1998-01-09
2
Medium Priority
?
203 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 120 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

885 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