webbot bot="DatabaseRegionStart

P

Pierre de Beer

Hi



I am creating a ASP page that retrieves data from 3 SQL tables. This works
well.



The problem is to pass a parameter to the web bot to retrieve the correct
record.



The phrase "WHERE (Matter.AppId = 8)" in the following code should
change to replace the "8" with a parameter from a variable.



Please help



Kind Regards



Pierre



<!--webbot bot="DatabaseRegionStart"
s-columnnames="AppId,MORTGAGE_ORIGINATOR_X,MORTGAGE_ORIGINATOR_CONTA,MORTGAGE_ORIGINATOR_TEL_N,MORTGAGE_ORIGINATOR_REF_N,MORTGAGE_ORIGINATOR_DEAL_,OCCUP_I,OCCUP_D,OCCUP_FIRST_I,AppId,PRPTY_N,ERF_N,PRPTY_DESC_X,DELIVERY_METHOD,APPLICATION_DATE,VALIDITY_DATE,ELEC_ACC,WATER_ACC,TYPE_OF_TRANSACTION,ASSESSMENT_RATES,PRCHS_A,SUBURB_X,REASON_FOR_APP,PRCHS_D,DEED_OF_TRANS_NO,PRPTY_AREA_Q,VALUATION_REQ,EXTRA_1,EXTRA_2,EXTRA_3,EXTRA_4,SELLER_NAME_X,SELLER_TEL_N,STREET_ADDRESS_X,PORTION_N,USER_REF,RATES_PAYABLE_I,TYPE_OF_PROPERTY,PRPTY_TYPE_X,CMPLX_NAME_X,SECT_TITLE_UNIT_N,Expr1"
s-columntypes="3,200,200,200,200,11,11,135,11,3,3,200,200,200,135,135,200,200,200,6,6,200,200,135,200,200,11,200,200,200,200,200,200,200,200,200,200,200,204,200,3,3"
s-dataconnection="database1" b-tableformat="FALSE" 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="FALSE" s-recordsource
s-displaycolumns="AppId,MORTGAGE_ORIGINATOR_X,MORTGAGE_ORIGINATOR_CONTA,MORTGAGE_ORIGINATOR_TEL_N,MORTGAGE_ORIGINATOR_REF_N,MORTGAGE_ORIGINATOR_DEAL_,OCCUP_I,OCCUP_D,OCCUP_FIRST_I,AppId,PRPTY_N,ERF_N,PRPTY_DESC_X,DELIVERY_METHOD,APPLICATION_DATE,VALIDITY_DATE,ELEC_ACC,WATER_ACC,TYPE_OF_TRANSACTION,ASSESSMENT_RATES,PRCHS_A,SUBURB_X,REASON_FOR_APP,PRCHS_D,DEED_OF_TRANS_NO,PRPTY_AREA_Q,VALUATION_REQ,EXTRA_1,EXTRA_2,EXTRA_3,EXTRA_4,SELLER_NAME_X,SELLER_TEL_N,STREET_ADDRESS_X,PORTION_N,USER_REF,RATES_PAYABLE_I,TYPE_OF_PROPERTY,PRPTY_TYPE_X,CMPLX_NAME_X,SECT_TITLE_UNIT_N,Expr1"
s-criteria s-order s-sql="SELECT Matter.*, Matter_Elements.*,
Matter.AppId AS Expr1&lt;br&gt;FROM Matter INNER JOIN&lt;br&gt;
Matter_Elements ON Matter.AppId = Matter_Elements.AppId&lt;br&gt;WHERE
(Matter.AppId = 8)" 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="BODY" preview="&lt;table border=0
width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td
bgcolor=&quot;#FFFF00&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is
the start of a Database Results region. The page must be fetched from a web
server with a web browser to display correctly; the current web is stored on
your local disk or
network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"
startspan --><!--#include file="../_fpclass/fpdblib.inc"-->
 
P

Pierre de Beer

I get the variable from another form by using the following script;



<%
'the request.form gets the info within the boxes of the form actioned
'from the previous HTML/ASP
gotAppID = Request.form("AppId")
%>
 
P

Pierre de Beer

Thank You

This does not work either, I also tried using WHERE (AppId = ::gotAppID::)

No luck

Pierre
 
P

Pierre de Beer

This is the error that I am getting. Looks like the variable is not visable
to the query

Pierre

Database Results Error
Description: Line 1: Incorrect syntax near ')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for SQL Server

One or more form fields were empty. You should provide default values for
all form fields that are used in the query.Database Results Error
Description: Line 1: Incorrect syntax near ')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for SQL Server

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

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