Question

FrontPage Database Query Problem

Asked by: mmurray46

Thanks in advance.  Not sure why database errors have always been so prevalent with FrontPage BUT...

I went through the steps (See link) for creating a database Query form using an Access Database imbedded within FrontPage 2002.  

http://www.outfront.net/spooky/search_form.htm

When I run a query against KNOWN database content for a given field, no records are returned but the .asp page does return a "no records returned" message in the database results region.  Any ideas?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-04-01 at 07:45:50ID20940157
Tags

frontpage

,

spooky

Topic

FrontPage-Expressions

Participating Experts
2
Points
250
Comments
28

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Using Frontpage??? Newbie
    I am trying set up a simple form to pass a variable to my ASP page, I am using frontpage to test this, I am first building up my skills bu trying the basics. here is my html: <html> <head> <meta name="Microsoft Theme" content="arcs 011">...
  2. Use of FrontPage
    I've started on a new project and the big boss says I must make it so that he can modify the site with FrontPage. That I can do. However, what I would like is a list reasons of why I shouldn't allow it. I know some of the reasons (icky code and stuff). I'd like links of secu...
  3. frontpage
    where can i find a free download of frontpage 2002?
  4. FrontPage Database Query Problem
    Thanks in advance. Not sure why database errors have always been so prevalent with FrontPage BUT... I went through the steps (See link) for creating a database Query form using an Access Database imbedded within FrontPage 2002. http://www.outfront.net/spooky/search_form....

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: hhammashPosted on 2004-04-01 at 12:27:32ID: 10735507

Hi,

Did you remove the message of "Nor records returned" from the box in the options area?

This is strange,  it should display that message if it is available in the box.

Regards
hhammash

 

by: mmurray46Posted on 2004-04-01 at 12:38:55ID: 10735609

The message displays fine and correct.  That's the probem  - the query returns no data (records) even though there are records in the database.

 

by: hhammashPosted on 2004-04-01 at 13:35:05ID: 10736114

Hi,

Are you sure that the database is verified in the Tools>WebSettings>Databases?

Regards
hhammash

 

by: rcmbPosted on 2004-04-02 at 04:08:52ID: 10739966

The problem is in your query. Please cut and paste your SQL query (see below). I am interested in the line fp_sQry. What I suspect your problem is you let FrontPage build your query for a specific selection when you probably need to edit it. I see this problem frequently and when you modify the query you get the results you desire. The no records returned indicate the database connection is good and frontpage is actually doing as it is designed but your query cannot find any record matches which returns the no records returned value.

RCMB

<%
fp_sQry="SELECT * FROM Accessories ORDER BY Description ASC, Size ASC"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=3 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Demo"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=3
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>

 

by: mmurray46Posted on 2004-04-02 at 09:48:30ID: 10742702

hhammash - It was, in fact, not verified.  However, I just verified it - locked in the verification and tried it again - still no records are returned...

RCMB - I did let FrontPage build the querys for the two search form fields I specified in the wizard.  Those two fields (and thier respective queries) are as follows:

Name Field: <%=Request("Name")%>
CDDVDClientJob Field: <%=Request("CDDVDClientJob")%>

Are you suggesting I edit and paste your queries in instead?


 

by: hhammashPosted on 2004-04-02 at 13:37:40ID: 10744677

Hi mmurray46,

We need you to post the SQL statement that is in your frontpage.

Either go to HTML view and copy the line
fp_sQry="SELECT * FROM ......etc"

Or open the DRW and clic Custom button and copy the SQL from there?

Maybe your SQL is OK syntatically but will not retrieve anything.

Thanks
hhammash

 

by: hhammashPosted on 2004-04-02 at 13:38:50ID: 10744680

Sorry for the typo,  I mean syntactically

 

by: mmurray46Posted on 2004-04-02 at 14:09:22ID: 10744854

Got it:

<%
fp_sQry="SELECT * FROM Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')"
fp_sDefault="Name=&CDDVDClientJob="
fp_sNoRecords="<tr><td colspan=4 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=50
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ID"
fp_sMenuValue="ID"
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

 

by: rcmbPosted on 2004-04-02 at 15:57:57ID: 10745455

Okay - your SQL statement looks fine as long as you are in fact passing text to the asp page and the database is setup as text fields. The single quotes around '::Name::' indicates the SQL statement will take whatever is passed and insert it in between the double colons. If it is a number then remove the single quotes, if it is a date replace the single quotes with #. Just a little info.

On to your problem - I assume you have a form with two boxes that when submit is clicked it goes to the asp page with the results not being displayed. Are the form boxes named Name and CDDVDClientJob respectively. The SQL statement you provided is looking for the information passed from a form or querystring with those names. The way it works is SELECT * FROM Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::') means to select everything from the table folders where Name equals the name you pass ('::Name::') and CDDVDClientJob equals the CDDVDClientJob you pass ('::CDDVDClientJob::'). To make sure everything is working remove everything after Folders --

to do this go to HTML view and just above the red font sql statement that you pasted is a grey line with the same information. Scroll about 3/4 of the way over and edit the grey text to remove everything in your SQL statement after Folders. The display looks like "SELECT * From Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')" and I want it to look like "SELECT * From Folders".

Now run the page and you will see everything displayed. This indicates the database and asp page are functioning you just have a problem in passing the "WHERE" information. I suspect the problem is in the form and the form box names.

Long winded but I wanted to make sure you understand. Be careful in editing the HTML view and only delete the WHERE... information leave the remainder of the line in tact.

RCMB

 

by: mmurray46Posted on 2004-04-03 at 07:59:50ID: 10747906

Well first off thanks for so MUCH information.  First an update.  One of the fields in the Access Datatase was a Date/Time field.  I changed it to TEXT so now all three fields are text fields.  Also - as the tutorial in link I gave initially prescribes, this is a single page ASP form which contains the two search fields and the database results region all in the same page (didn't know if that matterd).

Question:  Are you (still) suggesting I edit this Webbot line above the red SQL text? Just a note that I did that and got a page not found afterwards.

 <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-columntypes="3,202,135,202" s-dataconnection="Database1" 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="Folders" s-displaycolumns="ID,Name,Modified,CDDVDClientJob" s-criteria="[Name] EQ {Name} + [CDDVDClientJob] EQ {CDDVDClientJob} +" s-order s-sql="SELECT * FROM Folders"

Everything below was cut off.............................

 s-DefaultFields b-procedure BOTID="0" s-NoRecordsFound i-MaxRecords i-GroupSize u-dblib u-dbrgn1 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;" startspan--><!--#include file="_fpclass/fpdblib.inc"-->



 

by: rcmbPosted on 2004-04-03 at 08:26:48ID: 10748006

I don't think you understood what I was saying. I only wanted the gray SQL portion modified. In your statement "Everything below was cut off" all needs to be put back in its original location or you will get the error you were seeing. Just edit to portion

s-sql="SELECT...."

between the double quotes.

You have it reading correctly so just put the other stuff back where it belongs.

RCMB

 

by: hhammashPosted on 2004-04-03 at 11:40:36ID: 10748786

Hi,

Are you 100% sure that you have data in your database to match the AND in your SQL.  If you are not getting any error message or any data,  it means that your SQL is correct but there is not data matching.

It strange becuase your SQL is fine.

RCB would like you to test the connection between the ASP and the database,  run SQL without any condition to see if it displays everything.  If it does that means the connection is correct but you don't have data to match the AND.

You can go back to the properties of you DRW and don't select any criteria,  just list all records.  

Besides if your ASP (DRW) page is not put to Spooky Diet then when you save it all your corrections will be disregarded.

Here is the link for the steps on how to put your page on diet if you want to edit the ASP page in HTML view.  http://www.outfront.net/spooky/adv_drw.htm


Regards
hhammash

 

by: mmurray46Posted on 2004-04-03 at 16:03:09ID: 10749899

rcmb - what I pasted in IS the GRAY SQL Portion - all of the text I pasted in (now below) is Gray in my HTLM view.  Here's an idea - make the edits to the code for me and I'll paste it back in.  Again, here is the GREY text above the red SQL Statement:

<!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-columntypes="3,202,135,202" s-dataconnection="Database1" 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="Folders" s-displaycolumns="ID,Name,Modified,CDDVDClientJob" s-criteria="[Name] EQ {Name} + [CDDVDClientJob] EQ {CDDVDClientJob} +" s-order s-sql="SELECT * FROM Folders" s-DefaultFields b-procedure BOTID="0" s-NoRecordsFound i-MaxRecords i-GroupSize u-dblib u-dbrgn1 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;" startspan--><!--#include file="_fpclass/fpdblib.inc"-->

hhammash - I am 100% sure I have data in my database.  However, you may have revealed a miscommunication on my part.  I don't want these queries to find records with "Name" or "CDDVDClientJob" in them - those are column headings.  I want to be able to search the database against those columns (Field Names) to return what ever data I query for.  Again - this is (supposed to be) a single .asp page with two query fields and a database region intended to return rows or records based on the criteria I feed into the query fields.  Apologies if I didn't communicate this clearly.



 

by: rcmbPosted on 2004-04-03 at 17:32:31ID: 10750264

Okay - to keep from messing things up, lets double click on the top yellow bar ("this is the start of a database results region") in your normal view. This will open the database results wizard (DBRW).

Click next twice and in the 3rd step click on More Options, Criteria and remove anything in there. This will remove all of the "WHERE" statement. Finish the DBRW and then save and run your page. This should display all of the information in the database.

Send me the fields in your database and I will then tell you what to enter in the 3rd step of the DBRW to make the page display the information you desire.

RCMB

 

by: mmurray46Posted on 2004-04-03 at 18:30:04ID: 10750445

Thanks for your patience - sorry for any miscommunication.  I must have tried using the wrong query tutorial.

What do you mean by Finish the DBRW?  After deleting the queries you mentioned (in step 3) the page no longer loads but I suspect thats pbecause it's expecting queries.

- ID (Unique Key
- Name (Text)
- Modified (Text)
- CDDVDClientJob Text)

 

by: rcmbPosted on 2004-04-03 at 19:06:44ID: 10750542

To finish the DBRW just select the defaults in steps 4 and 5 to finish the wizard.

Do me a favor and switch to HTML view and copy and paste the entire page here. I know your database now and I want to see your code. I will update and let you know what I find wrong (or where the problem is).

RCMB

 

by: mmurray46Posted on 2004-04-04 at 18:37:35ID: 10754326

<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>Name</title>
</head>

<body>

<form BOTID="0" METHOD="POST" ACTION="archives.asp">
  <table BORDER="0">
    <tr>
      <td><b>Name</b></td>
      <td><input TYPE="TEXT" NAME="Name" VALUE="<%=Request("Name")%>" size="20"></td>
    </tr>
    <tr>
      <td><b>CDDVDClientJob</b></td>
      <td>
      <input TYPE="TEXT" NAME="CDDVDClientJob" VALUE="<%=Request("CDDVDClientJob")%>" size="20"></td>
    </tr>
  </table>
  <p><br>
  <input TYPE="Submit"><input TYPE="Reset"><!--webbot bot="SaveAsASP" clientside suggestedext="asp" preview=" " startspan --><!--webbot bot="SaveAsASP" endspan --></p>
  <p>&nbsp;</p>
</form>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>ID</b></td>
      <td><b>Name</b></td>
      <td><b>Modified</b></td>
      <td><b>CDDVDClientJob</b></td>
    </tr>
  </thead>
  <tbody>
    <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-columntypes="3,202,202,202" s-dataconnection="Database1" 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="Folders" s-displaycolumns="ID,Name,Modified,CDDVDClientJob" s-criteria="" s-order s-sql="SELECT * FROM Folders" s-DefaultFields b-procedure="FALSE" BOTID="0" s-NoRecordsFound="No records returned." i-MaxRecords="256" i-GroupSize="0" u-dblib u-dbrgn1 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;" startspan b-WasTableFormat="TRUE"--><!--#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 Folders"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=4 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ID"
fp_sMenuValue="ID"
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="44884"-->
<% 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 Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')"
fp_sDefault="Name=&CDDVDClientJob="
fp_sNoRecords="<tr><td colspan=4 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=50
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="ID"
fp_sMenuValue="ID"
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="59034" --><tr>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" 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" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="Name" 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;Name&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Name")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="3900" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="Modified" 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;Modified&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Modified")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="16236" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="CDDVDClientJob" 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;CDDVDClientJob&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"CDDVDClientJob")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="36465" --></td>
    </tr>
    <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE" u-dbrgn2="" 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>

 

by: rcmbPosted on 2004-04-05 at 01:23:20ID: 10755610

mmurray46,

Is the file an .asp page - based on the information you gave me it is not and it must be

"...The page must have a filename ending in '.asp'"

rename the file to .asp vice .htm

Are you running the file on a webserver?

RCMB

 

by: rcmbPosted on 2004-04-05 at 06:47:12ID: 10757273

mmurray46 - here is the code all working correctly. I created a ms access database with the same fields as yours and with the database connection named "database1". I ran the file named "archives.asp" and it worked per design. When you first open the file it will not show any data until you enter a name and CDDVDClientJob. The results must be an exact match of both fields. For example I had test1 as a name and test11 as CDDVDClientJob. If you desire more generic results then I recommend using LIKE instead of EQUALS.

For instance SELECT * FROM Folders WHERE (Name LIKE  '::Name::%' AND CDDVDClientJob LIKE  '::CDDVDClientJob::%')

If I entered test in the name box and test in the CDDVDClientJob will return

test1
test2
test3

In other words the % at the end indicates "BEGINS WITH"
% at the beginning indicates "ENDS WITH"
and a % at both ends indicated "CONTAINS"

Play with until you find what you desire.

 


<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>Name</title>
</head>

<body>

<form BOTID="0" METHOD="POST" ACTION="archives.asp">
  <table BORDER="0">
    <tr>
      <td><b>Name</b></td>
      <td><input TYPE="TEXT" NAME="Name" VALUE="<%=Request("Name")%>" size="20"></td>
    </tr>
    <tr>
      <td><b>CDDVDClientJob</b></td>
      <td>
      <input TYPE="TEXT" NAME="CDDVDClientJob" VALUE="<%=Request("CDDVDClientJob")%>" size="20"></td>
    </tr>
  </table>
  <p><br>
  <input TYPE="Submit"><input TYPE="Reset"><!--webbot bot="SaveAsASP" clientside suggestedext="asp" preview=" " --></p>
  <p>&nbsp;</p>
</form>
<table width="100%" border="1">
  <thead>
    <tr>
      <td><b>ID</b></td>
      <td><b>Name</b></td>
      <td><b>Modified</b></td>
      <td><b>CDDVDClientJob</b></td>
    </tr>
  </thead>
  <tbody>
    <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-columntypes="3,202,135,202" s-dataconnection="Database1" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Folders" s-displaycolumns="ID,Name,Modified,CDDVDClientJob" s-criteria="[Name] EQ {Name} + [CDDVDClientJob] EQ {CDDVDClientJob} +" s-order s-sql="SELECT * FROM Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields="Name=&amp;CDDVDClientJob=" 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;" 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 Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')"
fp_sDefault="Name=&CDDVDClientJob="
fp_sNoRecords="<tr><td colspan=4 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=4
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="41917" --><tr>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" 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" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="Name" 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;Name&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Name")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="3900" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="Modified" 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;Modified&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Modified")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="16236" --></td>
      <td>
      <!--webbot bot="DatabaseResultColumn" s-columnnames="ID,Name,Modified,CDDVDClientJob" s-column="CDDVDClientJob" 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;CDDVDClientJob&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"CDDVDClientJob")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="36465" --></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>

 

by: mmurray46Posted on 2004-04-05 at 07:59:27ID: 10757875

OK: is this code edited or changed or is it the same as what I sent earlier?

 

by: rcmbPosted on 2004-04-05 at 09:38:08ID: 10758779

It was edited to put the WHERE statements back in and ensure all was working per design. Just copy the code from <html> to </html> to replace all of your code.

RCMB

 

by: mmurray46Posted on 2004-04-05 at 11:26:50ID: 10759807

OK - We're making progress.  I was able to get a query to work using criteria in each field for specific data.  However, now when I replace:

"SELECT * FROM Folders WHERE (Name =  '::Name::' AND CDDVDClientJob =  '::CDDVDClientJob::')"

with

"SELECT * FROM Folders WHERE (Name LIKE  '::Name::%' AND CDDVDClientJob LIKE  '::CDDVDClientJob::%')

and save it - it automatically reverts back to the original - like it doesn't want to accept the "LIKE" condition...

Also what if I only want to search using one of the fields or the other ot both at the same time?  Are we looking at a complete query rewrite?

 

by: mmurray46Posted on 2004-04-05 at 11:37:30ID: 10759917

GOT IT!!!  

I entered the statement into the Red SQL statement area instead of the gray.  Tried the gray and whala!  THANK YOU VERY MUCH!  So in hindsight, it was probably working all the long - it was just that I wasn't playing by the rules for criteria I had set up through the wizard.  Duh!  

 

by: rcmbPosted on 2004-04-05 at 13:24:13ID: 10760739

The nice thing about the like statement is that if you enter data in one of the fields the other does not require an entry to get a return. If you have LIKE on both fields and just hit submit then it will return all records in the database.

RCMB

 

by: mmurray46Posted on 2004-04-05 at 14:11:21ID: 10761127

OK Well we're not quite there yet.  The first field, "Name" seems to be working perfectly!  It returns results on all or just portions of the data you query.

BUT, the 2d field, "CDDVDClientJob", WILL return results ONLY if you search on a number.  For Example:  If I search this field (which contains an entry for "1020|Bloomingdales3") for 1020 it brings up all "1020" entries just fine.  

However, if I search for "Bloomingdales", "Bloomingdales3", or "|Bloomingdales' I get no results.  Is the "|" an illegal character or something?

 

by: rcmbPosted on 2004-04-05 at 14:24:21ID: 10761215

The problem is where the % sign is. The % at the end ('::CDDVDClientJob::%') means "begins with" so the query searches any thing that begins with "Bloomingdales", "Bloomingdales3", or "|Bloomingdales". As you can see in your database you have nothing that begins with that. It in fact begins with 1020 which is why that works. If you want to perform a "contains" query put the % at both ends ('%::CDDVDClientJob::%') or if you want to do an "ends with" put the % at the beginning ('%::CDDVDClientJob::' - in this case the opposite would occur - 1020 would return nothing).

RCMB

 

by: mmurray46Posted on 2004-04-05 at 14:33:56ID: 10761282

That did it!  I guess I can stop bothering you now.  Can't thank you enough.

 

by: rcmbPosted on 2004-04-05 at 14:55:58ID: 10761433

My pleasure - glad to get this done and hopefully you learned a little bit and can enjoy FrontPage even more once you start getting into the depths of ASP.

Curtis

RCMB

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...