hi everybody ,
could u please help me to find out the error on my asp codes,i can't retrieve the inserted values.
Here is below the code:
<%@LANGUAGE="VB SCRIPT" CODEPAGE="1252" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
connect_string = "Driver={SQ L Server};Server= NLROSDBCL9-10;Database=Sca nners;Uid=scann ers;Pwd=bertran d;"
set dbConn = Server.createOb ject ("ADODB.connect ion")
dbConn.open connect_string
mySQL ="select * from EMPLOYEE,DEPART MENT,SCANNER,TE CHNICALDESCR WHERE EMPLOYEE.emplNO =SCANNER.emplNO AND EMPLOYEE.dprtNo =DEPARTMENT.dpr tNO AND SCANNER.scandes cr=TECHNICALDES CR.scandescr"
set result=dbConn.e xecute(mySQL)
On Error Resume Next
If result.eof then
response.write "There are no records."
Else
Do while NOT result.eof
Response.write result("EMPLNO" )
Response.write result("EMPLNAM E")
Response.write result("EMPLSTA RTDATE")
Response.write result("EMPLSTA TUS")
Response.write result("DPRTNO" )
Response.write result("SCANNO" )
Response.write result("SCANDES CR")
Response.write result("DOCUMEN T")
Response.write result("FILES")
Response.write result("DPRTNAM E")
Response.write result("DPRTLOC ATION")
Response.write "<br>"
result.MoveNext
Loop
End if
result.Close
Set result =Nothing
dbConn.Close
Set dbConn = Nothing
%>
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#99999 9">
<form action="scanner 2.asp" method="post">
<table >
EMPLOYEE
<tr>
<td height="70">Emp lNO </td> <td ><input name="emplNo" type="text"> </td>
<td >EmplName</td> <td ><input name="emplName" type="text"></td>
<td >EmplStartdat e</td><td ><input name="emplStart Date" type="text"></td>
<td >EmplStatus</td><td ><input name="emplStatu s" type="text"></td>
<td >DprtNo</td><td ><input name="DprtNo" type="text"></td>
</tr></table>
<table>DEPARTME NT
<tr>
<td height="70">Dpr tNo</td><td><input name="DprtNo" type="text"></td>
<td>DprtName</td><td><input name="DrptName" type="text"></td>
<td>DprtLocatio n</td><td><input name="DprtLocat ion" type="text"></td>
</tr>
</table>
<table>SCANNE R
<tr>
<td height="70">Sca nNo</td><td><input name="ScanNo" type="text"></td>
<td>ScanDescr </td><td><input name="ScanDescr " type="text"></td>
<td>EmplNo</td><td><input name="EmplNo" type="text"></td>
</tr>
</table>
<table >TECHNICALDES CR
<tr>
<td height="70">Sca nDescr</td>
<td><input name="ScanDescr " type="text"></td>
<td>Document</td><td><input name="Document" type="text"></td>
<td> Files</td>
<td><input name="Files" type="text"></td>
</tr>
</table>
<td width="50">&nbs p;
<input name="Insert" value="Insert" type="submit"></td>
<td width="50">&nbs p; < input name="Reset" value="Reset" type="reset"></td>
</table>
</form>
</body>
</html>
Best regards,
Bazubwabo J.B.
could u please help me to find out the error on my asp codes,i can't retrieve the inserted values.
Here is below the code:
<%@LANGUAGE="VB SCRIPT" CODEPAGE="1252" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
connect_string = "Driver={SQ L Server};Server= NLROSDBCL9-10;Database=Sca nners;Uid=scann ers;Pwd=bertran d;"
set dbConn = Server.createOb ject ("ADODB.connect ion")
dbConn.open connect_string
mySQL ="select * from EMPLOYEE,DEPART MENT,SCANNER,TE CHNICALDESCR WHERE EMPLOYEE.emplNO =SCANNER.emplNO AND EMPLOYEE.dprtNo =DEPARTMENT.dpr tNO AND SCANNER.scandes cr=TECHNICALDES CR.scandescr"
set result=dbConn.e xecute(mySQL)
On Error Resume Next
If result.eof then
response.write "There are no records."
Else
Do while NOT result.eof
Response.write result("EMPLNO" )
Response.write result("EMPLNAM E")
Response.write result("EMPLSTA RTDATE")
Response.write result("EMPLSTA TUS")
Response.write result("DPRTNO" )
Response.write result("SCANNO" )
Response.write result("SCANDES CR")
Response.write result("DOCUMEN T")
Response.write result("FILES")
Response.write result("DPRTNAM E")
Response.write result("DPRTLOC ATION")
Response.write "<br>"
result.MoveNext
Loop
End if
result.Close
Set result =Nothing
dbConn.Close
Set dbConn = Nothing
%>
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#99999 9">
<form action="scanner 2.asp" method="post">
<table >
EMPLOYEE
<tr>
<td height="70">Emp lNO </td> <td ><input name="emplNo" type="text"> </td>
<td >EmplName</td> <td ><input name="emplName" type="text"></td>
<td >EmplStartdat e</td><td ><input name="emplStart Date" type="text"></td>
<td >EmplStatus</td><td ><input name="emplStatu s" type="text"></td>
<td >DprtNo</td><td ><input name="DprtNo" type="text"></td>
</tr></table>
<table>DEPARTME NT
<tr>
<td height="70">Dpr tNo</td><td><input name="DprtNo" type="text"></td>
<td>DprtName</td><td><input name="DrptName" type="text"></td>
<td>DprtLocatio n</td><td><input name="DprtLocat ion" type="text"></td>
</tr>
</table>
<table>SCANNE R
<tr>
<td height="70">Sca nNo</td><td><input name="ScanNo" type="text"></td>
<td>ScanDescr </td><td><input name="ScanDescr " type="text"></td>
<td>EmplNo</td><td><input name="EmplNo" type="text"></td>
</tr>
</table>
<table >TECHNICALDES CR
<tr>
<td height="70">Sca nDescr</td>
<td><input name="ScanDescr " type="text"></td>
<td>Document</td><td><input name="Document" type="text"></td>
<td> Files</td>
<td><input name="Files" type="text"></td>
</tr>
</table>
<td width="50">&nbs p;
<input name="Insert" value="Insert" type="submit"></td>
<td width="50">&nbs p; < input name="Reset" value="Reset" type="reset"></td>
</table>
</form>
</body>
</html>
Best regards,
Bazubwabo J.B.
Comment