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

asp page calling second asp page, second page stops, won't close

Status
Not open for further replies.

sharonc

Programmer
Jan 16, 2001
189
US
I have a contractors.asp page that the method=post action=loaddata.asp

When I run contractors.asp, it runs completely through loaddata.asp, but then it just sits in the browser on the blank page of loaddata.asp. how do I get it to return to Contractors.asp?

Here is my code:

contractors.asp

<form method=&quot;post&quot; action=&quot;//seims/project3_local/contractors/loaddata.asp&quot; name=&quot;Contractors&quot;>

loaddata.asp

<%@ language=vbscript %>
<!--#include virtual=&quot;/adovbs.inc&quot;-->
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>

<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;_Themes/blends/THEME.CSS&quot; VI6.0THEME=&quot;Blends&quot;>
<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;_Themes/blends/GRAPH0.CSS&quot; VI6.0THEME=&quot;Blends&quot;>
<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;_Themes/blends/COLOR0.CSS&quot; VI6.0THEME=&quot;Blends&quot;>
<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;_Themes/blends/CUSTOM.CSS&quot; VI6.0THEME=&quot;Blends&quot;></HEAD>
<html>
<BODY>

<P> </P>

<%
Dim Conn, rs, sqlStatement, strHost, Msg, mail,CurrentDate

Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open &quot;driver=SQL Server;SERVER=SEIMS;DATABASE=FORMS;UID=sa;PWD=;&quot;

sqlStatement = &quot;Contractors&quot;
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
rs.open sqlStatement, Conn,adOpenKeyset,adLockOptimistic, adCmdTable

rs.AddNew
CurrentDate = Request.Form(&quot;EntryDate&quot;)
If Not ISDate(CurrentDate) Then
rs(&quot;EntryDate&quot;) = Date()
Else
rs(&quot;EntryDate&quot;) = Request.Form(&quot;EntryDate&quot;)
End If
rs(&quot;ContractorFirstName&quot;) = Request.Form(&quot;ContractorFirstName&quot;)
rs(&quot;ContractorLastName&quot;) = Request.Form(&quot;ContractorLastName&quot;)

rs.Update

'Close
rs.Close
set rs = nothing
Conn.Close
set conn = nothing

%>
</BODY>
</html>
 
You don't appear to be telling it to go anywhere. If you just want to send them back to the page they came from you could add Response.Redirect(&quot;contractors.asp&quot;) at the end of your code. That way it will do whatever processing that you want and then send them back to the contractors page.

Roj
 
Thank you so much. That works perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top