bass__man
Posts: 10 Joined: 8/15/2005 Status: offline
|
RE: Database Results Step 2 Problem - 8/16/2005 17:46:08
I am using FP2002. The database name is OHSMaster.mdb and I renamed the tables to OHS1954, OHS1955, OHS1956, etc. and still have the same problem. I am using a dropdown box in my form. The form page is below. <html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<form method="POST" action="test2.asp" name="form1">
<p><select size="1" name="classyear" onchange=form1.submit()>
<option value="OHS1941">1941</option>
<option value="OHS1944">1944</option>
<option value="OHS1945">1945</option>
<option value="OHS1946">1946</option>
<option value="OHS1947">1947</option>
</select></p>
</form>
</body>
</html> The database is on test2.asp and will display a table if I specify the table name directly. But gives me this error if I try to use the form field name. Should I have anything on the database page pointing to the page that the form is on. Error is below. Server error: Unable to retrieve schema information from the query: SELECT * FROM 1 against a database using the connection string DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/OHSMaster.mdb. The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured. ------------------------------------------------------- [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query '1'. Make sure it exists and that its name is spelled correctly. Source: Microsoft OLE DB Provider for ODBC Drivers Number: -2147467259 (0x80004005) Below is test2.asp, the database page. <html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<table border="1">
<thead>
<tr>
<td><b>School_Name</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" s-columnnames="School_Name,Full_Name,Street,City,State,Zip,Email,Phone,Web_Site,Birth_Date,Picture1,Picture2,Picture3,Picture4" s-columntypes="202,202,202,202,202,202,202,202,202,202,202,202,202,202" s-dataconnection="OHSM" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="FALSE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="OHS1978" s-displaycolumns="School_Name" s-criteria s-order="[School_Name] +" s-sql="SELECT * FROM OHS1978 ORDER BY School_Name ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound i-maxrecords="0" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the start of a Database Results region.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM OHS1978 ORDER BY School_Name ASC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=1 align=left width=""100%""></td></tr>"
fp_sDataConn="OHSM"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&School_Name=202&Full_Name=202&Street=202&City=202&State=202&Zip=202&Email=202&Phone=202&Web_Site=202&Birth_Date=202&Picture1=202&Picture2=202&Picture3=202&Picture4=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="45452" --><tr>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="School_Name,Full_Name,Street,City,State,Zip,Email,Phone,Web_Site,Birth_Date,Picture1,Picture2,Picture3,Picture4" s-column="School_Name" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="<font size="-1"><<</font>School_Name<font size="-1">>></font>" startspan --><%=FP_FieldVal(fp_rs,"School_Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="28556" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="TBODY" preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></tbody>
</table>
<p> </p>
</body>
</html>
|