Dear Friends,
Please help me out where I am doing mistake...I am trying to insert records into my MSSQL database...but it always take me into the "page cannot be displayed"....Here is the code....
AddEOi.asp
---------------------------------------------------------------------------------------------------
[HTML]<%
if session("username")="" then
response.Redirect("login.asp")
end if
if request.QueryString("action")="done" then
vartext="EOI Added Successfully"
end if
if request.QueryString("action")="Exist" then
vartext="EOI Code Already Exists"
end if
%>
<html>
<head>
<title>New Login</title></title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body leftMargin=0 topMargin=0><table width="100%" height="100%" cellpadding="1" bordercolor="#0000FF">
<tr>
<td valign="top"></td>
</tr>
<tr>
<td valign="top">
<table width="100%" align="center">
<tr>
<td bordercolor="#0000FF"><table width="100%" >
<tr bgcolor="#006699">
<td align="center"><div align="center"><strong><font color="#333333" size="4">Add EOI(Expression osf Interest)</font></strong></div></td>
</tr>
<tr>
<td align="center" class="mytextred"><%=vartext%></td>
</tr>
<tr>
<td>
<form name="frm" action="function_eoi.asp" method="post" >
<table width="86%" border="1" cellpadding="4" cellspacing="0" bordercolor="#006666" align="center">
<tr>
<td width="50%" align="right"> EOI Code :</td>
<td width="50%"><input type="text" name="code" id="code" ></td>
</tr>
<tr>
<td width="50%" align="right">Title :</td>
<td width="50%"><input type="text" name="title" id="title" ></td>
</tr>
<tr>
<td width="50%" align="right">Client :</td>
<td width="50%"><input type="text" name="client" id="client" ></td>
</tr>
<tr>
<td width="50%" align="right">Date of Submission :</td>
<td width="50%"><input type="text" name="datesub" id="datesub" ></td>
</tr>
<tr>
<td width="50%" align="right"> Status:</td>
<td width="50%"><select name="status">
<option value="Consideration">Consideration</option>
<option value="Shortlisted">Shortlisted</option>
<option value="Not Shortlisted">Not Shortlisted</option>
</select></td>
</tr>
<tr>
<td align="right"></td>
<td><input name="Submit" type="submit" id="Submit" value="Submit">
<input type="reset" name="Reset">
</td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>[/HTML]
----------------------------------------------------------------------------------------------------
function_eoi.asp
------------------------------------------------------------------------------------------------------
[HTML]<!-- #include file="include/connection.asp" -->
<%
if session("username")="" then
Response.Redirect("login.asp")
end if
code=Request("code")
title=Request("title")
client=Request("client")
datesub=Request("datesub")
status=Request("status")
rs1="select eoicode from eoi_test where eoicode='"& code &"'"
set rs1=Server.CreateObject("adodb.recordset")
rs1.Open rs1,con,1,3
if rs1.RecordCount>0 then
Response.Redirect "AddEOi.asp?action=Exist"
else
query="insert into eoi_test (eoicode,eoititle,client,datesubmit,status)values( '"& code &"','"& title &"', '"& client &"','"& datesub &"','"& status &"')"
rs1.Open query,con,1,3
Response.Redirect("AddEOi.asp?action=done")
end if
%>[/HTML]------------------------------------------------------------------------------------------------------
Please help me.......
Thanks
Deepak