Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, April 20, 2024 
 
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 - ADO General
Forum to discuss ADO specific questions for use with SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ADO General | New ThreadView:  Search:  
 Author  Thread: Clarification about using Locktype in recordset
satz
Posts: 75
 
Clarification about using Locktype in recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Jun 08 10:23 AM
hi slx users,

This is my code...My question is ,Do i have to set Lock types for the Recordset...? or Slx takes care of it.
i am worried about SQl conflict that takes place..When Multiple users simultaneously execute the below Script..

set objSLXDB = Application.GetNewConnection
set recorset = CreateObject("ADODB.Recordset")
recorset.Open "update account_misc set slx_cluster='20',Account_clusterid=null where Accountid ='AOD9EA000WAS'", objSLXDB
recorset.close
set recorset =nothing

Please clarify my doubt ..thanx in Advance..


[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Clarification about using Locktype in recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Jun 08 2:35 AM
SLX will definitely not take care of it - that function is devolved to the database manager e.g. SQL/Oracle. As you are only updating one col/row here - it's extremely unlikely that you will get a lock. There's no need to worry about this code.
[Reply][Quote]
satz
Posts: 75
 
Re: Clarification about using Locktype in recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 08 2:10 AM
thanx Mike for your suggestion...

So do i need to set Lock types in my script when i update mutiple Rows/Columns in Database.

if YEs, how to set and which Lock and cursor types i have to use for My script...Advice me ...thanks.
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Clarification about using Locktype in recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 08 3:27 AM
No, you should avoid over reacting to something that the DBServer will handle by itself. There are occasions where you would use the WITH keyword (but none of your examples exhibit the need to do that).

In other words - don't worry about it at all - just get on with your coding and let SQL server deal with it.
[Reply][Quote]
satz
Posts: 75
 
Re: Clarification about using Locktype in recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 08 4:49 AM
thanks mike...your Solution is cool.

its cool that SQl server takes care of it...Thx.
[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 © 2024 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): 4/20/2024 12:50:37 AM