I create/maintain the intranet pages for my office, more because I had an interest in it rather than being a programmer of any kind, which I'm not, though I am perpetually trying to learn.
Some of the links to documents on my site use the format "... .asp?action=name?cat=LNK21?catsub=211 where the cat= and catsub= changes for each link.
Using the normal table access method I capture the query string data into variables sCat and sCatSub and then place them into the SQL Select statement as "WHERE Category = '" & sCat & "' AND CatSub = '" & sCatSub & "'. This works okay.
I tried your code and I must be missing something obvious because the content of the variables is not being passed to the stored query.
I've tried both of these:
Set rs = con.Execute ("exec qryG8Links 'sCat', 'sCatSub'")
and
Set rs = con.Execute ("exec qryG8Links sCat, sCatSub")
But neither works. Should the variable names I used in the query itself be the same as the ones I am using in the asp code? I ask, because they are not. I used just 'cat' and 'catsub' in the SQL string.
The query itself does work. When i run it inside MS Access it asks for the parameters and when I type them in it displays the correct records.
I have a feeling whatever I'm doing wrong is very simple, but what is it? And what's the correct way to do it?
Any clues would be helpful. Thanks.