Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Urgent help plz!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-26-04, 10:46
krills krills is offline
Registered User
 
Join Date: Sep 2004
Posts: 5
Urgent help plz!

Hiya, im trying to delete an news entry from my database. When i go to the page in the browser i get this error:

"Error Type:
Sun ONE ASP VBScript compilation (0x800A03F6)
Expected 'End'
/newsremove.asp line 30, column 43"

Ive read several posts and searched google for hours and everytime its the same solution, theres and "end if" statement missing. But my little IF statement is complete as far as i know!

Line 30 is: "delid=request("delid")"
Code:
<form action="newsremove.asp" method="post"> Type in the ID of the post you wish to remove: <input type="text" name="delid" size=20><br> <b>Make sure its the right one! Once you delete a post it can't be recovered!!</b><br> <input type="submit" value="Im sure, remove this post!"> </form> <% if request("delid") = "" then delid=request("delid") sql="DELETE * FROM news WHERE ID='"& delid"'" set rs=conn.execute(sql) end if sql="SELECT * FROM news ORDER BY tid DESC" set rs=conn.execute(sql) do until rs.eof response.write "<hr align=left width=300 size=2 color=black noshading>" response.write rs("TID") & " by " & rs("POSTER") & ". ID: " & rs("ID") rs.moveNext loop %>
any tips or suggestions at all are more then welcome!!! im dying here!!!
Reply With Quote
  #2 (permalink)  
Old 09-26-04, 20:44
rokslide rokslide is offline
Coffee Minion
 
Join Date: Nov 2003
Location: Sydney
Posts: 1,515
this is only part of your code right?? post the whole page as the end if problem might actually be being generated somewhere else.
Reply With Quote
  #3 (permalink)  
Old 09-27-04, 01:49
priyanka-m6.net priyanka-m6.net is offline
Registered User
 
Join Date: Jul 2004
Posts: 94
Hi,
I cannot see the coding for database connectivity here.
what's the name of this page. what I feel is in the present form you need to write only the following:

<form action="newsremove.asp" method="post">
Type in the ID of the post you wish to remove: <input type="text" name="delid" size=20><br>
<b>Make sure its the right one! Once you delete a post it can't be recovered!!</b><br>
<input type="submit" value="Im sure, remove this post!">
</form>

and in the newsremove.asp you need to write the sql coding .
At the end of your code, you have to write
rs.close
conn.close

but first of all make sure that you have written the coding for database connectivity.
__________________
Priyanka
Windows web hosting with ASP,.Net,PHP,Perl,MySQL support
We help in making your dreams come true on internet!
Reply With Quote
  #4 (permalink)  
Old 09-27-04, 04:10
krills krills is offline
Registered User
 
Join Date: Sep 2004
Posts: 5
aaah i got it to work thanks for the help it was just some bug =)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On