i changed a couple of sql statemants in my asp files to access queries. now i always get -1 when using recordcount. i know i have to use "adOpenStatic" somehow, but i don't know how to do it here, since i'm not using "RS.Open", but the "execute"
that's what the query in access looks like:
PARAMETERS [@person] Text ( 255 );
SELECT DISTINCT bilder.unterkategorie, bilder.unterkategorie_e,
bilder.Name_e, bilder.Name
FROM bilder
WHERE (((bilder.Name)=[@person])) OR (((bilder.Name_e)=[@person]))
ORDER BY bilder.unterkategorie, bilder.unterkategorie_e;
---------------------------------------------------------
that's whats in the asp file:
SET nameConn3 = Server.CreateObject("ADODB.Connection")
nameConn3.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
Server.MapPath("../dbanken/bilder.mdb")
tempex = "exec query_unterkat '" & person & "'"
SET pickat = nameConn3.Execute(tempex)
IF pickat.RecordCount <> 0 THEN
WHILE NOT pickat.EOF
<a href=show_gallery.asp?person=" & Server.URLEncode(person) & "&kat="
& Server.URLEncode(pickat("unterkategorie_e")) & "&MOVE=1>" &
pickat("unterkategorie_e") & "</a><br>"
pickat.MoveNext
WEND
END IF
-------------------------------------------------------
if i try it that way:
SET pickat = Server.CreateObject("ADODB.RecordSet")
tempex = "exec query_unterkat '" & person & "'"
pickat.open nameConn3, tempex, 3, 3
i get an error which says something about arguments are out of range or wrong type. i only have the german error message, sorry:
"Die Argumente sind vom falschen Typ, liegen außerhalb des
Gültigkeitsbereiches oder sind miteinander unvereinbar."
Edited by - flaimo on 03 May 2001 11:20:40