CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Resolved - Using CCOpenRS to update files

Print topic Send  topic

Author Message
netsys

Posts: 39
Posted: 07/01/2010, 8:50 AM

I need to loop through a recordset, sending e-mails to this recordset, and then mark a field in the table that holds this data with today's date, so that it is marked as sent. I'm using CCOpenRS to loop through the data successfully, but when I try to use add the following:
rsResults.Addnew
rsResults.Fields("ReminderEMailSent")=Date()
rsResults.Update

I get an error on my page saying: ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

It looks like from my research that i need to change the recordset type to allow updating, but I can't seem to figure out where to do this. Will be happy to post the entire code for the page if needed.

Thanks in advance!
View profile  Send private message
lboeldt

Posts: 53
Posted: 07/01/2010, 8:00 PM

Hi Netsys,

Try the following, open your project. Go to the "Files" tab locate and open common.asp. Search for CCOpenRS about the fourth line down you'll see:

RecordSet.Open SQL, Connection, adOpenForwardOnly, adLockReadOnly, adCmdText

Change it to read:

RecordSet.Open SQL, Connection, adOpenForwardOnly, adLockOptimistic, adCmdText



Using locking will slow down other queries, so if I may suggest, make a copy of the CCOpenRS function name it CCOpenRSUpdate and apply the changes to the new function as suggested and then make calls to CCOpenRSUpdate for processes where you want to make updateable recordsets.
View profile  Send private message
netsys

Posts: 39
Posted: 07/02/2010, 6:06 AM

Thank you. This worked perfectly!
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 http://support.yessoftware.com.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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