Hello guys,<br>
<br>
Has anyone managed to do an update on an Oracle 8 table using the Update method of the ADODB Recordset object?<br>
Can anyone tell me what I'm doing wrong in :<br>
<br>
<!--#include virtual="/include/adovbs.inc"--><br>
<%<br>
Dim adoCon<br>
Dim rsUnixLogon<br>
Set adoCon = Server.CreateObject("ADODB.Connection"
<br>
strCon="DSN=WT;UID=linc;PWD=UNIX;"<br>
adoCon.Open strCon<br>
Set rsUnixLogon = Server.CreateObject("ADODB.Recordset"
<br>
strSQL="SELECT FLAG, MIN(UNIXID) FROM UNISURE_CS901 WHERE FLAG=0 GROUP BY FLAG"<br>
rsUnixLogon.CursorType = 1<br>
rsUnixLogon.LockType = 2<br>
rsUnixLogon.Open strSQL, adoCon<br>
If rsUnixLogon.BOF <> True Then<br>
SESSION("UnixLogon"
=rsUnixLogon(1)<br>
rsUnixLogon(0) = 1<br>
rsUnixLogon.Update<br>
Else<br>
Response.Redirect "UnixLogonError.asp"<br>
End If <br>
rsUnixLogon.Close<br>
Set rsUnixLogon = Nothing<br>
adoCon.Close<br>
Set adoCon = Nothing<br>
%><br>
<br>
This gives the following error:<br>
ADODB.Field error '800a0cb3'<br>
The operation requested by the application is not supported by the provider.<br>
(The line number indicated by the error is the one reading<br>
rsUnixLogon(0) = 1<br>
<br>
However, if I try to update using the Execute method of the Connection object, this works OK:<br>
<br>
<!--#include virtual="/include/adovbs.inc"--><br>
<%<br>
Dim adoCon<br>
Dim rsUnixLogon<br>
Set adoCon = Server.CreateObject("ADODB.Connection"
<br>
strCon="DSN=WT;UID=linc;PWD=UNIX;"<br>
adoCon.Open strCon<br>
Set rsUnixLogon = Server.CreateObject("ADODB.Recordset"
<br>
strSQL="SELECT FLAG, MIN(UNIXID) FROM UNISURE_CS901 WHERE FLAG=0 GROUP BY FLAG"<br>
rsUnixLogon.CursorType = 1<br>
rsUnixLogon.LockType = 2<br>
rsUnixLogon.Open strSQL, adoCon<br>
If rsUnixLogon.BOF <> True Then<br>
SESSION("UnixLogon"
=rsUnixLogon(1)<br>
adoCon.Execute "UPDATE UNISURE_CS901 SET FLAG = 1 WHERE UNIXID = '" & SESSION("UnixLogon"
& "'"<br>
Else<br>
Response.Redirect "UnixLogonError.asp"<br>
End If <br>
rsUnixLogon.Close<br>
Set rsUnixLogon = Nothing<br>
adoCon.Close<br>
Set adoCon = Nothing<br>
%><br>
<br>
Have also tried using the syntax "Recordset.Fields(fieldname) = value" which gives the same error...<br>
Does anyone have any suggestions? Would be very grateful!<br>
Cheers!<br>
Jonine
<br>
Has anyone managed to do an update on an Oracle 8 table using the Update method of the ADODB Recordset object?<br>
Can anyone tell me what I'm doing wrong in :<br>
<br>
<!--#include virtual="/include/adovbs.inc"--><br>
<%<br>
Dim adoCon<br>
Dim rsUnixLogon<br>
Set adoCon = Server.CreateObject("ADODB.Connection"
strCon="DSN=WT;UID=linc;PWD=UNIX;"<br>
adoCon.Open strCon<br>
Set rsUnixLogon = Server.CreateObject("ADODB.Recordset"
strSQL="SELECT FLAG, MIN(UNIXID) FROM UNISURE_CS901 WHERE FLAG=0 GROUP BY FLAG"<br>
rsUnixLogon.CursorType = 1<br>
rsUnixLogon.LockType = 2<br>
rsUnixLogon.Open strSQL, adoCon<br>
If rsUnixLogon.BOF <> True Then<br>
SESSION("UnixLogon"
rsUnixLogon(0) = 1<br>
rsUnixLogon.Update<br>
Else<br>
Response.Redirect "UnixLogonError.asp"<br>
End If <br>
rsUnixLogon.Close<br>
Set rsUnixLogon = Nothing<br>
adoCon.Close<br>
Set adoCon = Nothing<br>
%><br>
<br>
This gives the following error:<br>
ADODB.Field error '800a0cb3'<br>
The operation requested by the application is not supported by the provider.<br>
(The line number indicated by the error is the one reading<br>
rsUnixLogon(0) = 1<br>
<br>
However, if I try to update using the Execute method of the Connection object, this works OK:<br>
<br>
<!--#include virtual="/include/adovbs.inc"--><br>
<%<br>
Dim adoCon<br>
Dim rsUnixLogon<br>
Set adoCon = Server.CreateObject("ADODB.Connection"
strCon="DSN=WT;UID=linc;PWD=UNIX;"<br>
adoCon.Open strCon<br>
Set rsUnixLogon = Server.CreateObject("ADODB.Recordset"
strSQL="SELECT FLAG, MIN(UNIXID) FROM UNISURE_CS901 WHERE FLAG=0 GROUP BY FLAG"<br>
rsUnixLogon.CursorType = 1<br>
rsUnixLogon.LockType = 2<br>
rsUnixLogon.Open strSQL, adoCon<br>
If rsUnixLogon.BOF <> True Then<br>
SESSION("UnixLogon"
adoCon.Execute "UPDATE UNISURE_CS901 SET FLAG = 1 WHERE UNIXID = '" & SESSION("UnixLogon"
Else<br>
Response.Redirect "UnixLogonError.asp"<br>
End If <br>
rsUnixLogon.Close<br>
Set rsUnixLogon = Nothing<br>
adoCon.Close<br>
Set adoCon = Nothing<br>
%><br>
<br>
Have also tried using the syntax "Recordset.Fields(fieldname) = value" which gives the same error...<br>
Does anyone have any suggestions? Would be very grateful!<br>
Cheers!<br>
Jonine