Forums

ASP

This topic is locked

How to post/submit SQL where clause

Posted 31 Dec 2005 09:33:57
1
has voted
31 Dec 2005 09:33:57 Dennis Leahy posted:
Hi,

(ASP/VBScript/JavaScript/SQL Server 2000/DW MX 2004)

I have created a results page that was moderately complex, and so I want to use that same results page to display results from several different pages (which each have their own way to search a database: stored procedures, dynamic sql, etc.) One particular search page is complex, with lots of form fields, lots of form validation, and finally the assembly of the SQL WHERE (and ORDER BY) clause. Since I already have the SQL WHERE clause intact and assembled, I don't want to POST a string of form field values to reassemble the pieces on the results page. Can I send the WHERE clause intact to the results page?

The SQL WHERE clause could be long (I'm not sure if it could exceed the 2083 barrier.) Plus, I need to send a few other specific querystrings that the results page is expecting. I need to learn how to set up a custom POST routine. I have looked for examples, but have found nothing that looks right. Can anyone point me to some sample code?

EDIT: Could the SQL WHERE clause be assigned to a hidden field on the form, and sent that way?

TIA,

Dennis

Edited by - dtleahy on 31 Dec 2005 21:09:46

Reply to this topic