Forums
This topic is locked
Recordset Query from String
Posted 10 Jul 2003 15:55:06
1
has voted
10 Jul 2003 15:55:06 Jamie Ellwood posted:
I have a form whick passes a variable onto the next page. The variable is a string (ie. "1,3,23,56,65,77"
How can I create a recordset query which filters the ID number of the database with this string, only displaying the records corresponding to the numbers in the string?
Any help would be most appreciated.
Jamie
Replies
Replied 11 Jul 2003 13:50:12
11 Jul 2003 13:50:12 David Behan replied:
You can use the following sql statement:
strID = Request.QueryString("id"
sql_text="SELECT * FROM TBL_SAMPLES WHERE SMP_ID IN (" & strID & "
"
Regards,
Dave
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie
strID = Request.QueryString("id"

sql_text="SELECT * FROM TBL_SAMPLES WHERE SMP_ID IN (" & strID & "

Regards,
Dave
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie