Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: LAN ADO and RemoveSelectionFromGrid (SLX_Common script)
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
LAN ADO and RemoveSelectionFromGrid (SLX_Common script)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jun 11 11:45 AM
fiogf49gjkf0d

This SLX_Common routine is great for removing the rows from a grid recordset.......when I say False it doesn't  delete from the database.....awesome.


 When I reconnect the recordset to the SLX connection......and UpdateBatch.....all changes (Adds, Edits, Deletes) are committed to the database......and we're all still happy....especially since we only do the UpdateBatch when the user clicks on the OK button for the form.....i.e. they can add, edit, delete grid rows to their hearts content....and finally decide to throw all of the changes away and click on Cancel or 'X' out of the database. Yippee!


 So the issue is......


 why is the ADO delete deleting the PARENT Record?!!!! Ouch!


 So if I have A1.gridtablerowID, A2.OpportunityID, A2. Description.....and tell ADO to delete the A1 row left joined to Opportunity.....it's deleting the A2.Table row......


 I note that the SLX RemoveSelectionFromGrid routine builds up a 'stack' of ID's to delete....and then does an ExecuteSQL on those ID's.......


 Is that what I should be doing instead of an UpdateBatch?  I already walk through the recordset and process each ADD seperately as an A1 row insert (learned the hard way that ADO tried to insert the A2, A3 records as well.....guess that tells me about the deletes on the recordset?!?!?). Can I filter on the ADO recordset for the edits only and UpdateBatch on those records only?


Still shocked on how the Parents got deleted.....but thanks in advance for your insight.....


 


 

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 2:50:17 AM