Access searches over ASP pages

Results 1 to 3 of 3

Thread: Access searches over ASP pages

  1. #1
    Jack McClure Guest

    Default Access searches over ASP pages

    Okay, i&#039m very very new to asp. i have been charged with the task of creating an access database(Done) and then making a page so that it can be queried; the results of which would be emailed to another employee. this little page is going to be used over our intranet. i need some help. i&#039m using front page 2k, which i am regretting, to author my pages. fp2k is getting me no where; i need a definitive answer. i have been scouring the vast resources, but to no avail. can someone please help?<BR><BR>Jack mcclure<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Access searches over ASP pages

    Well, I&#039m not really sure of what you *exactly* want to achieve, but searches in an sql database are not hard.<BR><BR>An example: make a form to query the database, the form calls a search asp page (or the search page itself):<BR><BR>&#060;form method="POST" action="search.asp"><BR>&#060;input type="text" name="QS"><BR>&#060;/form><BR><BR>----<BR>Then simply make a select statement, e.g.:<BR>Search:<BR><BR>SearchString = Request.Form("QS")<BR>Set Database = Server.CreateObject("ADODB.Connection")<BR>Set RS = Server.CreateObject("ADODB.RecordSet")<BR>Database .Open "Your_database"<BR>SQLStmt = "SELECT * FROM Your_table "<BR>SQLStmt = SQLStmt & " WHERE some_column LIKE&#039%" & SearchString & "%&#039 ;"<BR>RS.Open SQLStmt, Database<BR><BR>This will generate a resultset with all entries matching the query.<BR><BR>---<BR>Email: You need some form of "extra" component for this, there are several commercial products available for this but I would use CDONTS which comes with NT. See<BR>for reference. CDONTS requires that CDO is installed on the server.<BR><BR>.jonas<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Access searches over ASP pages

    Jonas - <BR><BR>I tried your lines of code, which look like the ones that i have been experamenting with; the database connection works and i don&#039t get an error through the ASP, but there are no returned results when i search for something. I can&#039t figure out why when i call the database and then i query it, there are no returned records. i added a If rs.BOF and rs.EOF statement to the page, so i would no if my query was invalid. Can you reccommend any other good sites/book or advice? <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts