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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

...: I've been looking at this code for 2 long to find the problem :.. 4

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US
[tt]
Here's the problem and would appreciate your help fellas.

The Link

<div align=&quot;center&quot;><font color=&quot;#FF0000&quot;><a href=&quot;deleterecords2.asp?id=<%=(RS(&quot;id&quot;).value)%>&quot;>Delete</a></font></div>

As you can see, I'm passing the <%=(RS(&quot;id&quot;).value)%> over to deleterecords2.asp.


The processing page

<%@LANGUAGE=&quot;VBSCRIPT&quot;%>
<!--#include file=&quot;Connections/MYDSN.asp&quot; -->
<%
Dim deleteme__MMColParam
deleteme__MMColParam = &quot;1&quot;
if (Request.QueryString(&quot;id&quot;) <> &quot;&quot;) then deleteme__MMColParam = Request.QueryString(&quot;id&quot;)
%>
<%
set deleteme = Server.CreateObject(&quot;ADODB.Recordset&quot;)
deleteme.ActiveConnection = MM_MYDSN_STRING
deleteme.Source = &quot;SELECT * FROM tblUsers WHERE id = &quot; + Replace(deleteme__MMColParam, &quot;'&quot;, &quot;''&quot;) + &quot;&quot;
deleteme.CursorType = 0
deleteme.CursorLocation = 2
deleteme.LockType = 3
deleteme.Open()
deleteme_numRows = 0
%>
<%
deleteme.delete
response.redirect &quot;results.asp&quot;
%>
<%
deleteme.Close()
%>

The error I'm getting

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

Query-based delete failed because the row to delete could not be found.

'I have 3 records in my Access databaes with id's 10,11,12 so I know the records exists.


/USERS/deleterecords2.asp, line 20


Line 20

deleteme.delete




Thanks in advance...
[tt]&quot;A Successful man is one who can build a firm foundation with the bricks that others throw at him&quot;[/tt]
[noevil]
 
[tt] I guess both with the * and w/o work then? .I really appreciate your input JuanitaC. thanks again.
[tt]&quot;A Successful man is one who can build
a firm foundation with the bricks
that others throw at him&quot;
[/tt]

star.gif
star.gif
star.gif
star.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top