Solved

Delphi 3 refreshing Query

Posted on 1998-01-09
2
175 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
APK file name 7 63
Help to pass a value through a function 2 64
indy Tmemory stream non latin charcter issue 2 79
Working with hours 3 31
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 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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now