Forums
This topic is locked
Created a Stored proc ..
Posted 07 Jun 2003 08:32:04
1
has voted
07 Jun 2003 08:32:04 Sanjay Chachad posted:
Using Dreamweaver and ASP.Net (VB). Created a new stored proc, to insert a record, cp_TOPIC_INS. Inserted a command button and set the CommandName = "cp_TOPIC_INS". All works fine, but the only problem is everytime the page is loaded, the insert stored proc gets executed. How do I prevent this? Replies
Replied 07 Jun 2003 12:05:29
07 Jun 2003 12:05:29 Owen Eastwick replied:
You have to put the command within a condition, something like:
<% If Request("SubmitButtonName"
<> "" Then %>
<%
YOUR INSERT COMMAND CODE
%>
<%
End If
%>
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
<% If Request("SubmitButtonName"

<%
YOUR INSERT COMMAND CODE
%>
<%
End If
%>
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/