|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
ASP datasource won't allow add / update?
Code:
<%
' 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
objRS.AddNew
%>
When I try to execute this code, I get this error: Code:
ADODB.Recordset error '800a0cb3' Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. However, when I make the below call, it returns true: Code:
Response.Write(objRS.Supports(adAddNew)) Any idea what the problem might be? Thanks very much for helping this ASP newbie. -Cliff Last edited by cliffyman : April 28th, 2003 at 01:24 PM. |
|
#2
|
|||
|
|||
|
If you don't use any locktype, it uses adLockReadOnly by default. Try this:
Code:
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. Gilmour |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP datasource won't allow add / update? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|