ADODB.Recordset error "800a0cb3"
am 04.09.2006 15:54:01 von morelloHello Everybody,
I have the following ASP 3.0 code with Sqlserver 2000 Db:
<%
Dim ProvStrDb, OBJdbConnection
Dim RsRegistraAccesso, SqlRegistraAccesso
Const adOpenForwardOnly = 0
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
'---- LockTypeEnum Values ----
Const adLockReadOnly = 1
Const adLockPessimistic = 2
Const adLockOptimistic = 3
Const adLockBatchOptimistic = 4
'Connessione a db SqlServer
ProvStrDb = "Server=BOSS;Database=termomeccanica;Trusted_Connection=yes; "
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Provider = "sqloledb"
OBJdbConnection.Open ProvStrDb
SqlRegistraAccesso="Select Top 1 IdAdm, IdAzienda, Username, Password,
SessionId, AccessKey, " &_
"Username, Login, Accesso, mSec, Ip, Browser, Alert From TblAdmLog"
Set RsRegistraAccesso = Server.CreateObject("ADODB.Recordset")
RsRegistraAccesso.Open SqlRegistraAccesso, OBJdbConnection, 2, 3
RsRegistraAccesso.AddNew ' ROW 30ERROR ERROR
Response.End
%>
The system return the following error at row 30:
ADODB.Recordset error '800a0cb3'
Il set di record corrente non supporta l'aggiornamento. Potrebbe trattarsi
di una limitazione del provider o del tipo di blocco selezionato.
/prova.asp, line 30
I try to use different provider type and different cursor block type but
nothing.....
If i use :
StrSqlUpdate = " UPDATE tblAdm SET Cognome = N'fasdfsafas' WHERE (IdAdm
= 1)"
OBJdbConnection.Execute (StrSqlUpdate)
It's Works !!!!
Thanks For Your Help !