|
Hi there,
I'm very new to ASP but due to a deadline given to me at work I've had to try and learn fast with the help of sample code etc.
I have a knowledge base database with three tables, two of which are used for lookup purposes on the main "Problems" table. I have designed a form on a web page which can be used to add records to this database. I also have an asp page which displays these records in pages. However, I am struggling with the search form. The SQL statement to display all the records in the database is:
SELECT Problems.id, Problems.error, Categories.Category, Programs.Program, Problems.description, Problems.resolution FROM Problems, Categories, Programs WHERE Categories.CategoryRef = Problems.categoryref AND Programs.ProgramRef = Problems.programref
I have designed a search form where the user specifies the error, category, program and some keywords. I want to pass these details into a SQL statement similar to the below.
SELECT Problems.id, Problems.error, Categories.Category, Programs.Program, Problems.description, Problems.resolution FROM Problems, Categories, Programs WHERE Categories.CategoryRef = Problems.categoryref AND Programs.ProgramRef = Problems.programref AND Problems.error LIKE FormErrorField AND Categories.categoryref = FormCategoryField AND Programs.programref = FormProgramField AND Problems.description LIKE FormKeywordsField AND Problems.resolution LIKE FormKeywordsField
I'd then like it to either display on th same page or feed the resulting SQL statement into another asp page similar to the one I use to display all records.
I've seen various ways of doing this but have been unable to customize the examples I have found to my needs (maybe I'mjust trying to learn too fast but I'm on a deadline and have to). I need to get this done within a week and am struggling a bit. I can provide the files for the site I've already done if necessary.
Hope I've made some sense.
Many Thanks
Steve
|
|
|
I've adapted some code I found and it seems to be ok. However, when I submit the query it just refreshes the screen instead of displaying the table as specified. Any ideas? I've tried pasting my code into this query but it tries to resolve the code instead of displaying it as text.
Thanks
Steve
|
|
|
|
|
|
|
|