asp page using sql string for a to find records.

akohl's picture

They have: 117 posts

Joined: Feb 2001

I created the following sql string using access design view to open a recordset.

SELECT Authors.last_name, Books.title, Books.category
FROM (Authors INNER JOIN Books ON Authors.author_id = Books.author_id) INNER JOIN Publishers ON Books.publisher_id = Publishers.publisher_id
WHERE (((Books.category) Like "Halacha") AND ((Authors.author_id) Like "*") AND ((Books.book_id) Like "*") AND ((Publishers.publisher_id) Like "*"));

I then pasted it into the asp page like this:

sqlstr"SQL STATEMENT HERE"
rs1.open sqlstr,3,3

Doesn't work. I tried replacing the "" with ''.
Didn't help.

My objective is to use values from a form in this sql string and allow the user to navigate the database.

What do you suggest. And please hurry. I've got a deadline!

Thanks in Advance

Andy Kohlenberg
Jerusalem, Israel

akohl's picture

They have: 117 posts

Joined: Feb 2001

Sorry. I just caught my own mistake.
"rs1.open sqlstr,3,3"
I forgot to put in the connection object.

OK. But I still have a problem

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Andy,

It would help to know what you mean by not working. Is it throwing back an ASP error, or is it just not returning any records.

Give us the exact error message and we'll help you get it working.

PJ | Are we there yet?
pjboettcher.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.