Asp 3.0

He has: 9 posts

Joined: Oct 2001

I'm trying to get this to work, but I keep getting an error message. I have tried several methods. What I'm try to do is compare the value of the record set ID with the variable b.

Thank in advanced...

<?php

set db
= server.createobject("adodb.connection")
db.mode = admodereadwrite
db
.open ("provider=microsoft.jet.oledb.4.0;data source=" + server.mappath("data.mdb"))
dim rs, del
set rs
= server.createobject("adodb.recordset")
rs.open "select * from data where " & rs("id") & "= " & ""&b&"'", db, adopenstatic, adlockpessimistic
rs
.delete
?>

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

What is the error you're getting?

He has: 9 posts

Joined: Oct 2001

I'm getting the following error message:

ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

delete.asp, line 8

He has: 9 posts

Joined: Oct 2001

Also,
b = rs("id")

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.