What you are asking is how to get the values from Form fields on an
HTML page, and use then for a query?
Okay, first, you need to determine if you are 'posting' the data, or
is it pushing it in the QueryString. (Posting is recommended, because
there is a restrictive size limit on the URL, which would limit the
QueryString, bad for memo's.). So, for example, if you have this as
an HTML Page:
<HTML>
<FORM Name="MyForm" Method="Post" action="mysearchresults.asp">
Search: <input type="text" name="SearchString" size=20>
<br>
<input type="submit" name="Submit" value="Submit">
</FORM>
</HTML>
In the 'mysearchresults.asp' page, you can retrieve the value of
'SearchString' with the request object. You'll need to use ADO to
access your database:
<%
Dim cnn
dim rs
dim strSQL
set cnn=server.CreateObject("ADODB.Connection")
with cnn
.Provider="Microsoft.Jet.OLEDB.4.0"
.Open "ThePath to your DB"
end with
set rs=server.CreateObject("ADODB.Recordset")
strSQL="Select * From tblData Where tblData.QueryField=""" &
Request.Form("SearchString") & ";"""
rs.Open strSQL,cnn,1,1
if rs.EOF=false then
rs.MoveFirst
end if
do until rs.eof=true
response.write rs.("MyDataField").value & "<br>"
rs.movenext
loop
rs.close
set rs=nothing
cnn.close
set cnn=nothing
(watch for word wrapping on my code....)
w.*****@web.de (DeadManWalking) wrote in message news:<52**************************@posting.google. com>...
To all the knowing folks out there:
Please help me! I'm new to this stuff...
I'm in the need to call a paramter-query stored in an MS-Access-DB
from an FrontPage-ASP-site.
Can anybody tell me of a way to send FP-field-values from an ASP via
ODBC (or else) to an Access-DB?
System: AccessXP, FP2002
ANY ideas or answers will be appreciated
DMW