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

asp called from another asp page won't return

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 need to do a response.redirect to whatever page you want it to go to after you close your connection. the page above doesn't go anywhere.
hth
mb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top