C++ Builder

Moderators: Lundin
Number of threads: 509
Number of posts: 1146

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Delete Records from a DBGrid C++ Builder Posted by zuzito76 on 27 Feb 2012 at 3:02 AM
Hello friends. I have a problem: I´m trying to erase records from a DBGrid which is not updatable, this is, DBGrid which show dates from a query that use two tables. For example, we have a table named EMPLOYEES with the code of the employee and his name, and other table named ARTICLES (for sale) with the code of the Article, its name and the code of the employee who made the sale of this article. In the DBGrid i show the code of the articles and the name of the employees (not the code) that make each sale of that articles. I´m trying to erase records from that DBGrid, but i can´t do it. Eventually, making DBGrid->SelectedRows->Delete() it get error, cause it´s a DBGrid no updatablee it. If i make it using UpdateSql element and Query->Delete() (with the CachedUpdate option=true) i can erase the record, but it returns to the DBGrid when i exec it again. Any help please?? . Thanx a lot. Salutes.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.