Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 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: Updating Multiple Tables
Dave Cleary
Posts: 61
 
Updating Multiple TablesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Oct 12 9:29 AM
fiogf49gjkf0d

 


Hi


Is there a way of updating multiple tables in one ExecuteSQL script?


I can achieve this by adding in seperate Execute SQL tasks for each table I need to update, but was wondering if there was a way of updating a few tables at once, I thought it might have been easy as adding a begin and commit transaction to achieve this but obviously not:


This is what I have so far which gives me an error on the system's ExecuteSQL sub routine:


 


           
strSQL = "BEGIN TRANSACTION " & _                   
"UPDATE DCLACCLOA SET GAS_DATETOCUSTOMER = NULL, LOA_SUBMITTEDBY = NULL, GAS_LOAOBTAINEDDATE = NULL WHERE accountid IN (" & strAcctID & ") " & _
 "UPDATE ACCOUNT SET LEADSOURCEID = 'L6UJ9A00006I', alloc_data_type = 'ENRG'  WHERE accountid IN (" & strAcctID & ") " & _
 "COMMIT "
 objSLXDB.ExecuteSQL(strSQL)

I can update the tables individually but was wondering if this could be done in one go?


 


Can anyone advise?


Thanks


Dave


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Updating Multiple TablesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Oct 12 9:58 AM
fiogf49gjkf0d

You aren't actually update simultaneously (given above example) - you're merely committing a batch (if one fails, they all fail). You'll need to run them individually.

[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): 2/22/2025 11:21:19 PM