Access Database/FrontPage Display error

  • Thread starter Thread starter Paul Schandel
  • Start date Start date
P

Paul Schandel

While trying to create a basic FrontPage page to display the information
from my access database I get this error:

Database Results Error
Description: Syntax error in query. Incomplete query clause.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine

One or more form fields were empty. You should provide default values for
all form fields that are used in the query.

Now, I am only using 2 fields from the database. The ID number, and a
hostname associated with that hostname. If an particular ID number has an
unknown hostname at this time the field is inputed with a question mark. So
in this fashion both fields are completely populated. But I still get this
error.

Where else should I be looking?

Any help greatly appreciated.
 
Well this doesnt seem to have any effect on it either.

As I limited it to just the ID numbers in the search and I still got the
same error.


This is beginning to drive me batty. It does appear that the student who
created this database, put spaces in his table names, and left some entries
blank through out the table.

I am on trying to get 2 fields to display from the entire databas thought
the ID record number and the hostname of a machines.

but i noticed the web bot code made reference to ever field in the table.
Will this cause a problem?
 
As another test.

I created a whole new test database. With new simple table names and test
data. There were a total of 5 fields. All populated with data.

I cannot get it to just list out the data without getting the same error
knowing there are at this time no spaces or otherwise in the page but still
get the following error:

Database Results Error
Description: Syntax error in query. Incomplete query clause.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine



thanks...
 
here is a direct cut and paste of the code the frontpage creates using the
DRW.

<table width="100%" border="1">
<thead>
<tr>
<td><b>ID</b></td>
<td><b>HostName</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="ID,HostName,IP,Location,Mfg"
s-columntypes="3,202,202,202,202" s-dataconnection="DR-TEST"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice="ID" s-menuvalue="ID"
b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE"
b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0"
b-makeform="TRUE" s-recordsource="DR Book" s-displaycolumns="ID,HostName"
s-criteria s-order s-sql="SELECT * FROM &amp;quot;DR Book&amp;quot;"
b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields
s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0"
botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc"
u-dbrgn2="_fpclass/fpdbrgn2.inc" tag="TBODY" preview="&lt;tr&gt;&lt;td
colspan=64 bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the
start of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;"
b-WasTableFormat="TRUE" 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 ""DR Book"""
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=2 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="DR-TEST"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ID"
fp_sMenuValue="ID"
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="3038" --><tr>
<td><a href="display.asp?ID=<%=FP_FieldURL(fp_rs,"ID")%>">
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,HostName,IP,Location,Mfg" s-column="ID"
b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside
b-MenuFormat preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ID&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"ID")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="62813" --></a></td>
<td>
<!--webbot bot="DatabaseResultColumn"
s-columnnames="ID,HostName,IP,Location,Mfg" s-column="HostName"
b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside
b-MenuFormat preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;HostName&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"
startspan --><%=FP_FieldVal(fp_rs,"HostName")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="15953" --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY" preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;
width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the
end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;"
startspan --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="62730" --></tbody>
</table>

</body>

</html>


--
Thanks
Paul Schandel

------------------
http://www.get-me-home.org
Thomas A. Rowe said:
Please show us the query statement you are using.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================


Paul Schandel said:
As another test.

I created a whole new test database. With new simple table names and test
data. There were a total of 5 fields. All populated with data.

I cannot get it to just list out the data without getting the same error
knowing there are at this time no spaces or otherwise in the page but still
get the following error:

Database Results Error
Description: Syntax error in query. Incomplete query clause.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine



thanks...
has
 
I don't work with the FP database component, so someone else will need to
help you. However, remove all spaces from your tables and field names might
help.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Paul Schandel said:
here is a direct cut and paste of the code the frontpage creates using the
DRW.

I spent a bit of time trying to test this code. This was difficult
because I don't have a copy of the database. I tried to create a test
database with all the same file, table and field names and ran into
various problems, but not, "Syntax error in query. Incomplete query
clause."

My recommendation is this: rename the Access file name, the database
connection name, the table name, and all the field names. Assign new
names that consist of numbers and letters only, with the first
character being a letter.

Then, delete your database region and create a new one from scratch.

I realize that this is pretty drastic, and that you'd probably prefer
a point fix. But spaces, hyphens, and special characters in general
require special treatment in SQL statements, and that treatment varies
by database system. Your database results region might work perfectly
well "as is" with a SQL Server database, for example.

FrontPage doesn't handle all these nuances well and messages like
"Syntax error in Query" often result. So, the best solution is
generally to use simple names throughout and avoid the need for
treatment of special characters.

If this advice doesn't provide a solution, please send me the
offending asp and mdb files by e-mail.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Back
Top