Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages
Started by Randel Bjorkquist
Fri, 12 Oct 2001 20:10
sql_MySQL->Refresh();
Author: Randel Bjorkquist
Date: Fri, 12 Oct 2001 20:10
Date: Fri, 12 Oct 2001 20:10
33 lines
2294 bytes
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
Re: sql_MySQL->Refresh();
Author: Mark Cashman
Date: Mon, 29 Oct 2001 12:14
Date: Mon, 29 Oct 2001 12:14
18 lines
1549 bytes
1549 bytes
Hi, Randel! The Refresh method of TQuery has never worked. In fact, I believe it doesn't actually have an implementation. I have many times implemented a TQuery descendant just to override that function as closing and then opening the query. I hope this helps. ------ Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at http://www.temporaldoorway.com - Original digital art, writing, music and more - C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring (Join us!) http://www.temporaldoorway.com/programming/index.htm ------
Re: sql_MySQL->Refresh();
Author: Daniel Brown
Date: Mon, 29 Oct 2001 23:04
Date: Mon, 29 Oct 2001 23:04
31 lines
1929 bytes
1929 bytes
Hey I have also had this problem, the easist way to overcome it, it like the previous post said, Just Close() and Open() it, This will "Refreash" (so to speak) your SQL quesry Daniel Mark Cashman <mcashman@temporaldoorway.com> wrote in message news:3BDD4823.6B9DA7F0@temporaldoorway.com... > Hi, Randel! > > The Refresh method of TQuery has never worked. In fact, I believe it > doesn't actually have an implementation. > > I have many times implemented a TQuery descendant just to override that > function as closing and then opening the query. > > I hope this helps. > > ------ > Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at > http://www.temporaldoorway.com > - Original digital art, writing, music and more - > C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring > (Join us!) > http://www.temporaldoorway.com/programming/index.htm > ------ > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads