Hey all,
OK, I'm starting on my first application after the class I took. I think I'm having some DB trouble and I don't know enough to fix it. Here is the code:
<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("h:\\Microsoft SQL Server\MSSQL\data\catalogRequest_Data.MDF")
%>
<html>
<head>
<title>Welcome To The Manufacturer Catalog Request System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="mcrs_style.css" rel="stylesheet" type="text/css">
<!--<script src="mcrsLib.js"></script>-->
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="223" height="118"><img src="images/siteLogo_index.jpg" width="223" height="118"></td>
<td bgcolor="#006666"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="223" height="21"><img src="images/siteLogo_bottom.jpg" width="223" height="21"></td>
<td bgcolor="#CCCC99"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td valign="top"><h3>Please Select A Manufacturer:</h3>
<br>
<form name="catForm" method="post" action="">
<table width="50%" border="0" cellspacing="0" cellpadding="5">
<tr valign="top" bgcolor="#CCCC99">
<td colspan="2"><strong>Sample Form </strong></td>
</tr>
<tr valign="top">
<td width="20%" align="right">Manufacturers:</td>
<td width="80%">
<select name="mfgDropDown">
<option value="#" selected>PLEASE SELECT A MANUFACTURER</option>
<%
Set rs = cn.Execute("SELECT * FROM tManufacturers)
While NOT rs.EOF
Response.Write "<option value=" & rs("mfgID") & "value>" & rs("mfgName") & "label</option>"
rs.MoveNext
Wend
Set rs = Nothing
%>
</select>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2" bgcolor="#000000"><img src="images/spacer_000000.gif" width="1" height="2"></td>
</tr>
<tr>
<td align="center" valign="top" class="legalText">Copyright © 2005 PEI-Genesis. All rights reserved.<br>
If you have any problems using this application, please contact the Webmaster.<br>
For questions or comments, please contact Rita Delvecchio.
</td>
</tr>
</table>
</body>
</html>
Could someone point me in the right direction?
Much appreciated!
- MT
OK, I'm starting on my first application after the class I took. I think I'm having some DB trouble and I don't know enough to fix it. Here is the code:
<%
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.MapPath("h:\\Microsoft SQL Server\MSSQL\data\catalogRequest_Data.MDF")
%>
<html>
<head>
<title>Welcome To The Manufacturer Catalog Request System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="mcrs_style.css" rel="stylesheet" type="text/css">
<!--<script src="mcrsLib.js"></script>-->
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="223" height="118"><img src="images/siteLogo_index.jpg" width="223" height="118"></td>
<td bgcolor="#006666"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="223" height="21"><img src="images/siteLogo_bottom.jpg" width="223" height="21"></td>
<td bgcolor="#CCCC99"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td valign="top"><h3>Please Select A Manufacturer:</h3>
<br>
<form name="catForm" method="post" action="">
<table width="50%" border="0" cellspacing="0" cellpadding="5">
<tr valign="top" bgcolor="#CCCC99">
<td colspan="2"><strong>Sample Form </strong></td>
</tr>
<tr valign="top">
<td width="20%" align="right">Manufacturers:</td>
<td width="80%">
<select name="mfgDropDown">
<option value="#" selected>PLEASE SELECT A MANUFACTURER</option>
<%
Set rs = cn.Execute("SELECT * FROM tManufacturers)
While NOT rs.EOF
Response.Write "<option value=" & rs("mfgID") & "value>" & rs("mfgName") & "label</option>"
rs.MoveNext
Wend
Set rs = Nothing
%>
</select>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2" bgcolor="#000000"><img src="images/spacer_000000.gif" width="1" height="2"></td>
</tr>
<tr>
<td align="center" valign="top" class="legalText">Copyright © 2005 PEI-Genesis. All rights reserved.<br>
If you have any problems using this application, please contact the Webmaster.<br>
For questions or comments, please contact Rita Delvecchio.
</td>
</tr>
</table>
</body>
</html>
Could someone point me in the right direction?
Much appreciated!
- MT