<%
if not Request.QueryString("cn"="" then
demandnoteno =trim(Request.QueryString("cn")
uniqueidno = trim(Request.QueryString("ph")
set Con = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.RecordSet"
' Con.Open "FILE NAME=c:\mydatalink.udl"
sSQl="Driver=SQL Server;UID=;pwd=;DATABASE=;server="
Con.Open sSQL
'Con.Open "bbsrtel" , "" , ""
sql="select * from commercial where DNOTE_NO = '" & demandnoteno & "' and UID_NO = '" & uniqueidno & "'"
set rs = Con.Execute(sql)
if not rs.eof then
while not rs.eof
%>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="17%"><APPLET id=test_Dispatch1 height=77 width=119 code=test.class>
<PARAM NAME="img" VALUE="bsnllogo.jpg">
<PARAM NAME="id" VALUE="test_Dispatch1">
<PARAM NAME="height" VALUE="77">
<PARAM NAME="width" VALUE="119">
<PARAM NAME="code" VALUE="test.class">
<PARAM NAME="codeBase" VALUE="file://C:\Commbbsr\">
</APPLET>
</td>
<td width="64%">
<p align="center"><b><font size="5" face="Verdana" color="#0000ff">COMMERCIAL
QUERY DISPLAY</font></b></p>
<p align="center"><font face="Verdana" color="#0000ff" size="3"><b>*
BHUBANESWAR TELECOM *</b></font></p></td>
<td width="19%"><APPLET height=100 width=170 code=test.class>
<PARAM NAME="img" VALUE="stamp.jpg">
<PARAM NAME="height" VALUE="100">
<PARAM NAME="width" VALUE="170">
<PARAM NAME="code" VALUE="test.class">
<PARAM NAME="codeBase" VALUE="file://C:\Commbbsr\">
</APPLET>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Sub Name :</b></td>
<td width="66%"><%=rs("SUBNAME"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>Tel No.</b></td>
<td width="15%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>F/H Name :</b></td>
<td width="88%"><%=rs("FATHER_OR_HUSBAND_NAME"%></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="5%" rowspan="2" bgcolor="#c0c0c0"><b>Address
:</b></td>
<td width="57%"></td>
</tr>
<tr>
<td width="57%"><%=rs("ADDRESS1"%></td>
</tr>
</table><%=rs("ADDRESS2"%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="160">
<tr>
<td width="100%" height="22">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>D/N No.</b></td>
<td width="21%"><%=rs("DNOTE_NO"%></td>
<td width="67%" bgcolor="#c0c0c0"> </td>
</tr>
</table><tr>
<td width="100%"></td>
</tr>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>D/N Date</b></td>
<td width="21%"><%=rs("DNOTE_DT"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>Regn. No.</b></td>
<td width="29%"><%=rs("REGISTRATION_NO"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>A/N</b></td>
<td width="19%"><%=rs("_NOTE_NO"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Amount</b></td>
<td width="13%"><%=rs("AMOUNT"%></td>
<td width="24%" bgcolor="#c0c0c0"> </td>
<td width="25%"></td>
<td width="7%" bgcolor="#c0c0c0"><b>Date</b></td>
<td width="19%"><%=rs("ADV_NOTE_DT"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Pay Date</b></td>
<td width="13%"><%=rs("PAID_DATE"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>Exchange</b></td>
<td width="8%"><%=rs("EXC"%></td>
<td width="4%" bgcolor="#c0c0c0"><b>Cat</b></td>
<td width="13%"><%=rs("CATEGOR"%></td>
<td width="6%" bgcolor="#c0c0c0"><b>STD</b></td>
<td width="6%"><%=rs("STD_S"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>UID</b></td>
<td width="19%"><%=rs("UID_NO"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Appl. No</b></td>
<td width="13%"><%=rs("TEL_NO APP_NO"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>SDO No</b></td>
<td width="8%"></td>
<td width="55%" bgcolor="#c0c0c0"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Appl Dt</b></td>
<td width="13%"><%=rs("APP_DT"%></td>
<td width="75%" bgcolor="#c0c0c0"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Remark</b></td>
<td width="88%"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<p align="center"><a href=" all rights
Reserved</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
both demandnoteno & uniqueidno are variables. when i put the values in both the fields for query the query result shows HTTP 500 Internal Server Error.
Pls. find out the error and its solution.
if not Request.QueryString("cn"="" then
demandnoteno =trim(Request.QueryString("cn")
uniqueidno = trim(Request.QueryString("ph")
set Con = Server.CreateObject("ADODB.Connection"
set rs = Server.CreateObject("ADODB.RecordSet"
' Con.Open "FILE NAME=c:\mydatalink.udl"
sSQl="Driver=SQL Server;UID=;pwd=;DATABASE=;server="
Con.Open sSQL
'Con.Open "bbsrtel" , "" , ""
sql="select * from commercial where DNOTE_NO = '" & demandnoteno & "' and UID_NO = '" & uniqueidno & "'"
set rs = Con.Execute(sql)
if not rs.eof then
while not rs.eof
%>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="17%"><APPLET id=test_Dispatch1 height=77 width=119 code=test.class>
<PARAM NAME="img" VALUE="bsnllogo.jpg">
<PARAM NAME="id" VALUE="test_Dispatch1">
<PARAM NAME="height" VALUE="77">
<PARAM NAME="width" VALUE="119">
<PARAM NAME="code" VALUE="test.class">
<PARAM NAME="codeBase" VALUE="file://C:\Commbbsr\">
</APPLET>
</td>
<td width="64%">
<p align="center"><b><font size="5" face="Verdana" color="#0000ff">COMMERCIAL
QUERY DISPLAY</font></b></p>
<p align="center"><font face="Verdana" color="#0000ff" size="3"><b>*
BHUBANESWAR TELECOM *</b></font></p></td>
<td width="19%"><APPLET height=100 width=170 code=test.class>
<PARAM NAME="img" VALUE="stamp.jpg">
<PARAM NAME="height" VALUE="100">
<PARAM NAME="width" VALUE="170">
<PARAM NAME="code" VALUE="test.class">
<PARAM NAME="codeBase" VALUE="file://C:\Commbbsr\">
</APPLET>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Sub Name :</b></td>
<td width="66%"><%=rs("SUBNAME"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>Tel No.</b></td>
<td width="15%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>F/H Name :</b></td>
<td width="88%"><%=rs("FATHER_OR_HUSBAND_NAME"%></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="5%" rowspan="2" bgcolor="#c0c0c0"><b>Address
:</b></td>
<td width="57%"></td>
</tr>
<tr>
<td width="57%"><%=rs("ADDRESS1"%></td>
</tr>
</table><%=rs("ADDRESS2"%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="160">
<tr>
<td width="100%" height="22">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>D/N No.</b></td>
<td width="21%"><%=rs("DNOTE_NO"%></td>
<td width="67%" bgcolor="#c0c0c0"> </td>
</tr>
</table><tr>
<td width="100%"></td>
</tr>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>D/N Date</b></td>
<td width="21%"><%=rs("DNOTE_DT"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>Regn. No.</b></td>
<td width="29%"><%=rs("REGISTRATION_NO"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>A/N</b></td>
<td width="19%"><%=rs("_NOTE_NO"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Amount</b></td>
<td width="13%"><%=rs("AMOUNT"%></td>
<td width="24%" bgcolor="#c0c0c0"> </td>
<td width="25%"></td>
<td width="7%" bgcolor="#c0c0c0"><b>Date</b></td>
<td width="19%"><%=rs("ADV_NOTE_DT"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Pay Date</b></td>
<td width="13%"><%=rs("PAID_DATE"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>Exchange</b></td>
<td width="8%"><%=rs("EXC"%></td>
<td width="4%" bgcolor="#c0c0c0"><b>Cat</b></td>
<td width="13%"><%=rs("CATEGOR"%></td>
<td width="6%" bgcolor="#c0c0c0"><b>STD</b></td>
<td width="6%"><%=rs("STD_S"%></td>
<td width="7%" bgcolor="#c0c0c0"><b>UID</b></td>
<td width="19%"><%=rs("UID_NO"%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Appl. No</b></td>
<td width="13%"><%=rs("TEL_NO APP_NO"%></td>
<td width="12%" bgcolor="#c0c0c0"><b>SDO No</b></td>
<td width="8%"></td>
<td width="55%" bgcolor="#c0c0c0"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Appl Dt</b></td>
<td width="13%"><%=rs("APP_DT"%></td>
<td width="75%" bgcolor="#c0c0c0"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="12%" bgcolor="#c0c0c0"><b>Remark</b></td>
<td width="88%"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<p align="center"><a href=" all rights
Reserved</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
both demandnoteno & uniqueidno are variables. when i put the values in both the fields for query the query result shows HTTP 500 Internal Server Error.
Pls. find out the error and its solution.