Forums

ASP

This topic is locked

Recordset Value into a SQL statement variable??

Posted 16 Oct 2002 18:06:46
1
has voted
16 Oct 2002 18:06:46 Paul Lacey posted:
Hi,

does anybody know what the syntax is for bringing a value from a field in an existing Recordset into the runtime value box in an advanced SQL statement?

thanks in advance for any help!

Paul

Replies

Replied 17 Oct 2002 14:24:37
17 Oct 2002 14:24:37 Vince Baker replied:
Make sure the 1st recordset has the field in it you want to take,

In the second you will have something like:

Select *
Where Fieldname = MMColParam

when you specify the variable MMColParam in the runtime value add the following:

recordsetname1.fields.item("Fieldname".value

This will filter the second recordset on the value you have in the first.





Regards
Vince

Response.write("The best line of code you can ever use"

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 18 Oct 2002 11:01:59
18 Oct 2002 11:01:59 Paul Lacey replied:
Brilliant! Thanks, I was using PHP in a previous job and have now changed.

This will stop me looking stupid performing even the simple tasks!

thanks once again

Paul
Replied 06 Jul 2008 21:23:40
06 Jul 2008 21:23:40 joe santino replied:
guys i have tried this so many times, using your method and i keep getting this error message
Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$' in /homepages
Replied 06 Jul 2008 21:24:49
06 Jul 2008 21:24:49 joe santino replied:
or i get this
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /homepages/16/d147460636

Reply to this topic