🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #434

sql_MySQL->Refresh();

#434
From: Randel Bjorkquist
Date: Fri, 12 Oct 2001 20:10
33 lines
2294 bytes
Hi all,

My problem comes with updating the displayed data in a TDBGrid control on a
form after changing some of the data.  I'm trying to use the "Refresh()"
method of my TQuery component.  But I continually recieve errors.

While in the debugger, the error says:

"Project BLAH.exe raised exception class EDBEngineError with message 'Table
does not support this operation because it is not uniquely indexed.'.
Process stopped. Use Step or Run to continue."

I know I can do a sql_MySQL->Active = false; and then sql_MySQL->Active =
true; to refresh my dataset.  However, I'm kind of on a quest to finally
figure out why I continuely recieve this error and how to use this built in
method.

I'm using BCB5, sp1, Professional Edition, a ODBC DSN to connect to a SQL7.0
server.

I use the TDBGrid control to basically just disply the dataset from a TQuery
control (sql_MySQL) and other database aware controls to edit the dataset.
I currently have the properties, of the TQuery,  CashedUpdates to true and
AutoRefresh to true.  I have read a couple other newsgroup postings that
make reference to not using CashedUpdates or by not using them, it would
make some updating easier.  But honestly, I have no other idea then what
I've tried to explain to work with editing data on a form and then updating
the dataset.

Anyone know or have ideas?

Thanks in advanced,
Randel
Technical Details
Message-ID: <3bc74e4d$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,212043208eeedee2,start
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-10-12 13:13:35 PST
From: "Randel Bjorkquist" <rbjorkquist@coilcraft.com>
Newsgroups: borland.public.cppbuilder.database.multi-tier
Subject: sql_MySQL->Refresh();
Date: Fri, 12 Oct 2001 15:10:53 -0500
Lines: 36
Organization: Coilcraft, Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 209.172.185.194
Message-ID: <3bc74e4d$1_1@dnews>
X-Trace: dnews 1002917453 209.172.185.194 (12 Oct 2001 13:10:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!feeder.via.net!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews