ASP webbot

N

Nick Halfpenny

Hi All,

I put this question in a couple of days ago, but I haven't received posting
on it. Could someone have a look for me please !

Using the Database results wizard in Front Page 2002, I’ve created a standard
database enquiry page. This works fine, but my ultimate goal is to create a
complex SQL statement outside of this page, and insert the statement into the
<!—webbot procedure. This will give me greater flexiablity in
creating a SQL statement from the critera entered by a user. I can create
the SQL statement and pass it to a field within a ASP page.

For simplicity, in the example below, I’ve just shown part of my ASP page.
I’ve hard-coded the SQL statement in for this example. I’ve created a SQL
statement and put it into a field called TEST1. I want to be able to use
this field inside the <!—webbot against the S-SQL= item.

No matter how I present the TEST1 field to the S-SQL statement, it will not
use the value held within it. I’ve tried ::TEST1::, <%TEST1%>, etc, nothing
works.

I’m obviously not presenting the data incorrectly. Could someone kindly drop
me some hints, as I’m pulling teeth !!

ASP script example:

<%
dim test1
test1="SELECT * FROM Sol_Voidlist WHERE bedrooms=2"
response.write test1
%>
<!--webbot bot="DatabaseRegionStart"
s-columnnames="propref,houseno,proadd1,heatcode,bedrooms,proptypecode,area,offers,diff_in_weeks,voidstart,keyretdate,relettarget,actrelet,udd15,voidaltkey,voidsuffix,voidtype,eventbi,eventbidate,eventfcas,eventfcasdate,eventffl,eventffldate,sfacode,freetext"
s-columntypes="129,129,129,129,2,129,200,2,2,135,135,135,135,129,3,2,129,129,135,129,135,129,135,129,200"
s-dataconnection="Academy_Live" 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="Sol_voidlist"
s-displaycolumns="propref,houseno,proadd1,heatcode,bedrooms,proptypecode,area,offers,diff_in_weeks,voidstart,keyretdate,relettarget,actrelet,udd15,voidaltkey,voidsuffix,voidtype,eventbi,eventbidate,eventfcas,eventfcasdate,eventffl,eventffldate,sfacode,freetext"
s-criteria s-order s-sql=::test1:: b-procedure="FALSE" clientside
suggestedext="asp" s-defaultfields="" s-norecordsfound="No records returned."
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 s-NoRecordsFound --><!--#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="::test1::"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=25 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Academy_Live"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&propref=129&houseno=129&proadd1=129&heatcode=129&bedrooms=2&proptypecode=129&area=200&offers=2&diff_in_weeks=2&voidstart=135&keyretdate=135&relettarget=135&actrelet=135&udd15=129&voidaltkey=3&voidsuffix=2&voidtype=129&eventbi=129&eventbidate=135&eventfcas=129&eventfcasdate=135&eventffl=129&eventffldate=135&sfacode=129&freetext=200&"
fp_iDisplayCols=25
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>

Best Regards,

Nick
 
S

Steve Easton

iirc, a webbot is not editable, and even if you try to edit the bot information it will be over
written when you save the page.

That said, you "might" try editing the page in notepad and saving, but the instant you open and
close it in FrontPage at some later time it will be rewritten.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
N

Nick Halfpenny

Hi Steve,

Thanks for the response. I'm well aware the a webbot is not editable, unless
you use the FrontPage wizard ! My problem is not amending the webbot, but
passing data into a webbot 's-sql' command externally. In a normal ASP
script, you can pass data between fields by putting the field name between
':' e.g. test = '::test1::'. This would normally pass the data from test1 to
test !

Within the FrontPage database wizard it allows you enter criteria into your
select statement, but if you put ::test1:: as the criteria and then set the
value of the field prior to running the webbot statement, it should pick-up
value within the field, but it doesn't !!!

Basically, and I can't make it any simpler than this: I have a database and
I want to run a dynamic SQL query on it through a ASP page frontend, which
should grab the criteria from a different HTML page. The database wizard
seems to be useless as it can only cope with 'static' SQL statements. Please,
please, please, as anybody got a solution or an example that may point me in
the right direction.

Regards,

Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top