Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi 3 refreshing Query

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

688 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