Hi,
Could anyone tell what might be wrong with the follwing code....I cannot retrive values from the database....and yet no error is being displayed...could it possibly be a problem with my IIS configuration?
Connection string:
<%
Option Explicit
Dim myConn, myDb, rs, rs2, sql
myDb = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Test\videlibforasp.mdb"
Set myconn = server.createobject("ADODB.connection")
myConn.open myDb
set rs = server.createobject("ADODB.Recordset")
set rs2 = server.createobject("ADODB.Recordset")
%>
'Rental Entry:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="connect .asp" -->
<!--#include file="log.asp" -->
<html>
<head>
<SCRIPT LANGUAGE = "Javascript">
function checkall(theForm){
if (theForm.Rental_Date.value == ""){
alert("You must enter a Rental_Date");
return (false);}
if (theForm.Duration_Id.value == ""){
alert("You must select a Duration period");
return (false);}
if (theForm.Member_Id.value == ""){
alert("You must enter a Member_Id");
return (false);}
if (theForm.Item_Id.value == ""){
alert("You must enter an Item_Id");
return (false);}
//if (theForm..value == ""){
//alert("You must enter a Address");
//return (false);}
}
</SCRIPT > </head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><font face="Times New Roman, Times, serif" size="4">Rental Entry
</font></p>
<form name = "f" method="POST" onsubmit = "return checkall(this);" action="RentalUpdate.asp">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2" width="621">
<tr>
<td width="194">Rental_Date</td>
<td width="424">
<p align="left">
<input name="Rental_Date" size="43" ></td>
</tr>
<tr>
<td width="194">Return_Date</td>
<td width="424">
<p align="left">
<input name="Return_Date" size="43" ></td>
</tr>
<tr>
<td width="194">Duration</td>
<td width="424">
<p align="left">
<select size="1" name="Duration_Id" style="width: 310; height: 310">
<%
sql = "Select * from tblDuration ORDER BY Duration"
rs.open sql,myconn,3,3
do until rs.eof
%>
<option value = "<%=rs("Duration_Id")%> <%=rs("Duration")%> </option>
<%
rs.movenext
Loop
rs.close
%>
</select>
</td>
</tr>
<tr>
<td width="194">Member_Id</td>
<td width="424">
<p align="left">
<input name="Member_Id" size="43" ></td>
</tr>
<tr>
<td width="194">Item_Id</td>
<td width="424">
<p align="left">
<input name="Item_Id" size="43" ></td>
</tr>
</table>
</center>
</div>
<p align="center">
<br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2">
</p>
</form>
</body>
</html>
Thanks and regards,
Francis
Could anyone tell what might be wrong with the follwing code....I cannot retrive values from the database....and yet no error is being displayed...could it possibly be a problem with my IIS configuration?
Connection string:
<%
Option Explicit
Dim myConn, myDb, rs, rs2, sql
myDb = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Test\videlibforasp.mdb"
Set myconn = server.createobject("ADODB.connection")
myConn.open myDb
set rs = server.createobject("ADODB.Recordset")
set rs2 = server.createobject("ADODB.Recordset")
%>
'Rental Entry:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="connect .asp" -->
<!--#include file="log.asp" -->
<html>
<head>
<SCRIPT LANGUAGE = "Javascript">
function checkall(theForm){
if (theForm.Rental_Date.value == ""){
alert("You must enter a Rental_Date");
return (false);}
if (theForm.Duration_Id.value == ""){
alert("You must select a Duration period");
return (false);}
if (theForm.Member_Id.value == ""){
alert("You must enter a Member_Id");
return (false);}
if (theForm.Item_Id.value == ""){
alert("You must enter an Item_Id");
return (false);}
//if (theForm..value == ""){
//alert("You must enter a Address");
//return (false);}
}
</SCRIPT > </head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><font face="Times New Roman, Times, serif" size="4">Rental Entry
</font></p>
<form name = "f" method="POST" onsubmit = "return checkall(this);" action="RentalUpdate.asp">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber2" width="621">
<tr>
<td width="194">Rental_Date</td>
<td width="424">
<p align="left">
<input name="Rental_Date" size="43" ></td>
</tr>
<tr>
<td width="194">Return_Date</td>
<td width="424">
<p align="left">
<input name="Return_Date" size="43" ></td>
</tr>
<tr>
<td width="194">Duration</td>
<td width="424">
<p align="left">
<select size="1" name="Duration_Id" style="width: 310; height: 310">
<%
sql = "Select * from tblDuration ORDER BY Duration"
rs.open sql,myconn,3,3
do until rs.eof
%>
<option value = "<%=rs("Duration_Id")%> <%=rs("Duration")%> </option>
<%
rs.movenext
Loop
rs.close
%>
</select>
</td>
</tr>
<tr>
<td width="194">Member_Id</td>
<td width="424">
<p align="left">
<input name="Member_Id" size="43" ></td>
</tr>
<tr>
<td width="194">Item_Id</td>
<td width="424">
<p align="left">
<input name="Item_Id" size="43" ></td>
</tr>
</table>
</center>
</div>
<p align="center">
<br>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2">
</p>
</form>
</body>
</html>
Thanks and regards,
Francis