April 28th, 2003, 02:21 PM
ASP datasource won't allow add / update?
When I try to execute this code, I get this error:
' set up and open database connection
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=dsnname", "username", "password"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "pressrelease", objConn, adOpenDynamic
However, when I make the below call, it returns true:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
Any idea what the problem might be? Thanks very much for helping this ASP newbie.
Last edited by cliffyman; April 28th, 2003 at 02:24 PM.
April 29th, 2003, 02:56 AM
If you don't use any locktype, it uses adLockReadOnly by default. Try this:
objRS.Open "pressrelease", objConn, adOpenDynamic, adLockOptimistic
Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.