|
lovduv -> RE: Delete Query Troubles... (10/28/2005 22:25:52)
|
This is the full code for the page the DRW that the delete hyperlink submits too is on the same page...is that the problem? This is the page live http://www.missyandross.com/editblog.asp if you would like to see what it is doing when you try to delete just use the top record. Thanks!! <HTML> <HEAD> <% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit. FP_LCID = 1033 %> <meta http-equiv="Content-Language" content="en-us"> <TITLE>Edit Blog</TITLE> <% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit. FP_CharSet = "windows-1252" FP_CodePage = 1252 %> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <script language="JavaScript"> <!-- function FP_swapImg() {//v1.0 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } } } function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs=new Image; d.FP_imgs.src=a; } } function FP_getObjectByID(id,o) {//v1.0 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id); else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el; if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c) for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; } f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements; for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } } return null; } // --> </script> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onload="FP_preloadImgs(/*url*/'button718.jpg', /*url*/'button719.jpg')"> <!-- ImageReady Slices (showblog.psd) --> <TABLE WIDTH=1008 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD ROWSPAN=11> <IMG SRC="images/showblog_01.jpg" WIDTH=120 HEIGHT=255 ALT=""></TD> <TD COLSPAN=2> <IMG SRC="images/showblog_02.jpg" WIDTH=238 HEIGHT=38 ALT=""></TD> <TD COLSPAN=3 ROWSPAN=9> <IMG SRC="images/showblog_03.jpg" WIDTH=346 HEIGHT=216 ALT=""></TD> <TD ROWSPAN=2> <IMG SRC="images/showblog_04.jpg" WIDTH=76 HEIGHT=56 ALT=""></TD> <TD ROWSPAN=2> <A HREF="index.html"> <IMG SRC="images/showblogblog_05.jpg" WIDTH=108 HEIGHT=56 BORDER=0 ALT=""></A></TD> <TD ROWSPAN=11> <IMG SRC="images/showblog_06.jpg" WIDTH=120 HEIGHT=255 ALT=""></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=38 ALT=""></TD> </TR> <TR> <TD> <IMG SRC="images/showblog_07.jpg" WIDTH=83 HEIGHT=18 ALT=""></TD> <TD ROWSPAN=2> <A HREF="http://www.missyandross.com/photos.html"> <IMG SRC="images/showblog_08.jpg" WIDTH=155 HEIGHT=38 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=18 ALT=""></TD> </TR> <TR> <TD ROWSPAN=3> <A HREF="index.html"> <IMG SRC="images/showblog_09.jpg" WIDTH=83 HEIGHT=54 BORDER=0 ALT=""></A></TD> <TD COLSPAN=2 ROWSPAN=2> <A HREF="index.html"> <IMG SRC="images/showblog_10.jpg" WIDTH=184 HEIGHT=33 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=20 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <A HREF="http://www.missyandross.com/favorites.html"> <IMG SRC="images/showblog_11.jpg" WIDTH=155 HEIGHT=34 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=13 ALT=""></TD> </TR> <TR> <TD COLSPAN=2 ROWSPAN=7> <img border="0" src="images/editblogpic.jpg" width="184" height="166"></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=21 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <A HREF="contactus.html"> <IMG SRC="images/showblog_13.jpg" WIDTH=83 HEIGHT=53 BORDER=0 ALT=""></A></TD> <TD> <A HREF="http://www.missyandross.com/login.asp"> <IMG SRC="images/showblog_14.jpg" WIDTH=155 HEIGHT=38 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=38 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <A HREF="http://www.missyandross.com/news.html"> <IMG SRC="images/showblog_15.jpg" WIDTH=155 HEIGHT=36 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=15 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <A HREF="search.html"> <IMG SRC="images/showblog_16.jpg" WIDTH=83 HEIGHT=53 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=21 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <A HREF="http://www.missyandross.com/halo.html"> <IMG SRC="images/showblog_17.jpg" WIDTH=155 HEIGHT=47 BORDER=0 ALT=""></A></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=32 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> <IMG SRC="images/showblog_18.jpg" WIDTH=83 HEIGHT=39 ALT=""></TD> <TD ROWSPAN=2> <IMG SRC="images/showblog_19.jpg" WIDTH=89 HEIGHT=39 ALT=""></TD> <TD ROWSPAN=2> <img border="0" src="images/editblogbanner.gif" width="212" height="39"></TD> <TD ROWSPAN=2> <IMG SRC="images/showblog_21.jpg" WIDTH=45 HEIGHT=39 ALT=""></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=15 ALT=""></TD> </TR> <TR> <TD> <IMG SRC="images/showblog_18-23.jpg" WIDTH=155 HEIGHT=24 ALT=""></TD> <TD width="4"> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=24 ALT=""></TD> </TR> <TR> <TD ROWSPAN=2> </TD> <TD COLSPAN=7 valign="top"> <p align="center"><font size="4" face="Comic Sans MS">Edit your Blog by clicking on Delete or Update</font></p> <p align="center"><a href="userhome.asp"> <img border="0" id="img1" src="button717.jpg" height="20" width="100" alt="Blog Home" fp-style="fp-btn: Embossed Capsule 1; fp-font: Comic Sans MS; fp-font-style: Bold; fp-font-size: 12; fp-font-color-hover: #DC0A29; fp-font-color-press: #0000FF" fp-title="Blog Home" onmouseover="FP_swapImg(1,0,/*id*/'img1',/*url*/'button718.jpg')" onmouseout="FP_swapImg(0,0,/*id*/'img1',/*url*/'button717.jpg')" onmousedown="FP_swapImg(1,0,/*id*/'img1',/*url*/'button719.jpg')" onmouseup="FP_swapImg(0,0,/*id*/'img1',/*url*/'button718.jpg')"></a></p> <table width="101%" border="1"> <thead> <tr> <th ALIGN="LEFT" width="15%"> <p align="center"><font face="Comic Sans MS"><b>Date Added</b></font></th> <td colspan="3"> <p align="left"><font face="Comic Sans MS"><b>Blog Post</b></font></td> </tr> </thead> <tbody> <!--#include file="_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="SELECT * FROM Blog ORDER BY DateAdded DESC" fp_sDefault="" fp_sNoRecords="<tr><td colspan=2 align=""LEFT"" width=""100%"">No records returned.</td></tr>" fp_sDataConn="Database1" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=5 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&BlogID=3&UserID=3&UserName=202&DateAdded=135&RemoteAddress=202&BlogPost=203&" fp_iDisplayCols=2 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %> <!--#include file="_fpclass/fpdbrgn1.inc"--> <tr> <td width="15%" valign="top"> <p align="center"> <%=FP_FieldVal(fp_rs,"DateAdded")%></td> <td valign="top"> <%=FP_FieldVal(fp_rs,"BlogPost")%></td> <td width="9%" align="center" valign="top"> <a href="editblog.asp?BlogID=<%=FP_FieldURL(fp_rs,"BlogID")%>">Delete?</a></td> <td width="10%" align="center" valign="top"> <a href="update.asp?BlogID=<%=FP_FieldURL(fp_rs,"BlogID")%>">Update?</a></td> </tr> <!--#include file="_fpclass/fpdbrgn2.inc"--> </tbody> </table> <!--#include file="_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="DELETE * FROM Blog WHERE (BlogID = ::BlogID::)" fp_sDefault="" fp_sNoRecords="No records returned." fp_sDataConn="Database1" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_sColTypes="&" fp_iDisplayCols=16 fp_fCustomQuery=True BOTID=1 fp_iRegion=BOTID %> <!--#include file="_fpclass/fpdbrgn1.inc"--> <!--#include file="_fpclass/fpdbrgn2.inc"--> <p> </TD> <TD ROWSPAN=2 width="4"> </TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=399 ALT=""></TD> </TR> <TR> <TD COLSPAN=7> <IMG SRC="images/showblog_21-27.jpg" WIDTH=768 HEIGHT=46 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=46 ALT=""></TD> </TR> </TABLE> <!-- End ImageReady Slices --> </BODY> </HTML>
|
|
|
|