This topic is locked

Jumping to a specifc record or NULL records

3/19/2003 9:03:36 AM
ASPRunnerPro General questions
author

Great product - well worth the download and price.
I have a simple (I hope) question
I have a database of over 11,000 entries. ASP Runner works well and has created all I need. However, I need the initial search to default to 0 entries to speed the display up.
Can I pre-load an inital search so that it will return zero records on the default screen.
Forgive the possible stupid question - I dont want to learn too much ASP just need to fix my problem <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=22&image=1&table=forumtopics' class='bbc_emoticon' alt=':P' />

admin 3/19/2003

Glen,
that's a very good question!
Here is how you can do this manually:
Open your <tablename>list.asp file in notepad or any other text editror. Scroll down to find this

portion of code (usually it's around line 72)
Response.Write("<html>")

Response.Write("<head>")

Response.Write("<title>" & strTableName & "</title>")
Insert the following statement right before this potion of code.
if Request.Form="" then


strSQL="select * from " & strTableName & " where 1=0"
I'm going to include this into ASPRunner as a new feature.
Sergey Kornilov

500012 3/19/2003

Thanks!!
What excellent support.
That little beauty helps me a hugh amount.
Final question: Is it possible to preload a search criteria??
Say I want to pre-create some buttons that link to popular searches??
Is is a modification of:
if Request.Form="" then _

strSQL="select * from " & strTableName & " where 1=0"
Thanks so much for your help - much appreciated.
Glen

admin 3/19/2003

Glen,
Here how you can do this:
place this code anythere you like
<a href=# onCLick="document.forms.frmAdmin.action.value = 'search';

document.forms.frmAdmin.SQL.value = 'select * from categories where categoryid>5';

document.forms.frmAdmin.submit();

return false;">Search 1</a>
just replace SQL query with new one that you need.
Sergey Kornilov