Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could you please execute this code in your machine ?

Status
Not open for further replies.

Deadline

Programmer
Joined
Feb 28, 2001
Messages
367
Location
US
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..

Code:
<%@ TRANSACTION=REQUIRED %>

<!--#include file=&quot;ADOVBS.inc&quot;-->

<%
'commit and rollback code
sub OnTransactionCommit()    
    Response.write(&quot;Operation was successful&quot;)
End Sub

sub OnTransactionAbort()
    Response.write(&quot;Operation was unsuccessful&quot;)
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 = &quot;PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=&quot; & Server.MapPath(&quot;MyAccess.mdb&quot;) & &quot;;&quot;
'Establish a connection to the Access database
Set cnNEW = Server.CreateObject(&quot;ADODB.Connection&quot;)
cnNEW.Open strConn

lRN = somevalue
lLocationID = someothervalue

SQL = &quot; UPDATE REQUESTDETAIL SET OFFERDATE=CDATE(NOW()) WHERE RequestNumber=&quot; & lRN
SQL = SQL & &quot; AND LocationID=&quot; & lLocationID

Response.Write SQL
cnNEW.Execute SQL

If Err.number <> 0 THEN     
    ObjectContext.SetAbort
Else
    ObjectContext.SetComplete
END IF

SQL = &quot;UPDATE MAIN SET STATUS='O' WHERE REQUESTNUMBER=&quot; & lRN
cnNEW.Execute SQL

If Err.number <> 0 THEN
    ObjectContext.SetAbort
Else
    ObjectContext.SetComplete
END IF
%>
</BODY>
</HTML>
Thanks!

RR


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top