ASP & Access - using variables in query?

just wondering if anyone has any knowledge on using numeric variables in an ASP query to an access database.

basically so instead of being forced to use:

RecordsetHost1.Source = “SELECT * FROM [events calendar] WHERE HostID=1 ORDER BY StartDate DESC”,

HostID could be a variable use to display the respective page… unfortunately whatever i try i get errors… does anyone know the syntax for writing ‘HostID=n’?



RecordsetHost1.Source = "SELECT * FROM [events calendar] WHERE HostID=" & n & " ORDER BY StartDate DESC"

thanks ahmed, that works like a charm!.. leave it to Microsoft to create a scripting standard written in like a hundred different ways… :stuck_out_tongue: