Forum Moderators: open

Message Too Old, No Replies

sql query string

putting variable values into a query string

         

Extrobe

1:17 am on Nov 18, 2004 (gmt 0)

10+ Year Member



Hi, I'm trying to put together a query string with 5 values. The values are sitting in variables, but how do I get them from variables into the query string?

the query string currently looks like

response.redirect "add_fatal.asp?Auditer='Auditer'&Sample='Sample'&EmpID='EmpID'&DeptID='DeptID'&AuditDate='AuditDate'

the page gets redirect, but instead of the values, I just get Auditer, Sample, etc.

Extrobe

2:17 am on Nov 18, 2004 (gmt 0)

10+ Year Member



I've now managed to sort it, but when I 'print' the value, it has 's around it.

ie 'value1' instead of value1

I'm using

Response.Redirect "add_fatal.asp?Auditer='" & replace(auditer, "'", "''") & "'&Sample=

mattglet

3:15 am on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unless you need the quotes around the value, they aren't necessary.

Response.Redirect("add_fatal.asp?Auditer=" & yourAuditorVariable & "&Sample=" & yourSampleVariable & "&EmpID=" & yourEmpIDVariable & "&DeptID=" & yourDeptIDVariable & "&AuditDate=" & yourAuditDateVariable)

Extrobe

7:17 am on Nov 18, 2004 (gmt 0)

10+ Year Member



that's great, thank you.