CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> .NET

 Custom delete on editable grid at "Before Execute Delete Event"

Print topic Send  topic

Author Message

Posts: 14
Posted: 03/01/2005, 11:18 AM

I have three tables (Customers, Orders and OrderProducts). On the editable grid, currently I have set it correctly to delete the selected record of the Orders table. I created a "Before Execute Delete Event" in order to delete the records belonging to that Order just about to be deleted. I have all the code and working, but I need to know how to replace the correct value for the ord_id column in that record that is about to be deleted. Here is what I got right now.

Dim Request As HttpRequest = HttpContext.Current.Request
Dim NewDao As DataAccessObject = Settings.MSDBDataAccessObject
Dim Sql As String = "DELETE FROM OrderProducts WHERE ord_id = '{ord_id}'"

What I need is the correct code to be placed in {ord_id} that would be the ord_id that I selected to delete.

Any help would be appreciated... thanks
View profile  Send private message

Posts: 14
Posted: 03/02/2005, 9:21 AM

Alex A. from Support gave me the answer, in case anyone needs it for later... here it is:

Dim Sql As String = "DELETE FROM OrderProducts WHERE ord_id = '" + item.ord_idField.GetFormattedValue("") + "'"
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.