Hi, could you please identify whats wrong with the code below, by executing it in your machine ? The cnNEW.open gives me the error No Such Interface supported . Thank you very much for your time..
Thanks!
RR
Code:
<%@ TRANSACTION=REQUIRED %>
<!--#include file="ADOVBS.inc"-->
<%
'commit and rollback code
sub OnTransactionCommit()
Response.write("Operation was successful")
End Sub
sub OnTransactionAbort()
Response.write("Operation was unsuccessful")
End Sub
%>
<HTML>
<HEAD>
<TITLE>This page is not working for me.</TITLE>
</HEAD>
<BODY>
<OBJECT RUNAT=server PROGID=ADODB.Recordset id=rs></OBJECT>
<OBJECT RUNAT=server PROGID=CDONTS.NewMail id=mail> </OBJECT>
<%
Dim cnNEW
Dim strConn
Dim SQL
Dim lLocationID
Dim lUPI
Dim lRN
strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("MyAccess.mdb") & ";"
'Establish a connection to the Access database
Set cnNEW = Server.CreateObject("ADODB.Connection")
cnNEW.Open strConn
lRN = somevalue
lLocationID = someothervalue
SQL = " UPDATE REQUESTDETAIL SET OFFERDATE=CDATE(NOW()) WHERE RequestNumber=" & lRN
SQL = SQL & " AND LocationID=" & lLocationID
Response.Write SQL
cnNEW.Execute SQL
If Err.number <> 0 THEN
ObjectContext.SetAbort
Else
ObjectContext.SetComplete
END IF
SQL = "UPDATE MAIN SET STATUS='O' WHERE REQUESTNUMBER=" & lRN
cnNEW.Execute SQL
If Err.number <> 0 THEN
ObjectContext.SetAbort
Else
ObjectContext.SetComplete
END IF
%>
</BODY>
</HTML>
RR