webForumDet fria alternativet

fel?

1 svar · 172 visningar · startad av jns

jnsMedlem sedan dec. 2001132 inlägg
#1
ADODB.Recordset error '800a0bb9' 

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. 

/kalasmannen/guider.asp, line 81

detta felmeddelnade får jag på denna kod:

<%
sortera = request.querystring("sort")
subject = request.querystring("sub")

set mincon =Server.CreateObject("ADODB.Connection")
set rs = server.createobject("ADODB.Recordset")
mincon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\kalasmannen\db\db_guider.mdb")

if subject = hardware then
if sortera = "" then
SQL = "SELECT * from hardware order by ID desc"
end if

if sortera = "titel" then
SQL = "SELECT * from hardware order by titel asc"
end if

if sortera = "forfattare" then
SQL = "SELECT * from hardware order by av asc"
end if

if sortera = "datum" then
SQL = "SELECT * from hardware order by datum asc"
end if
end if

if subject = software then
if sortera = "" then
SQL = "SELECT * from software order by ID desc"
end if

if sortera = "titel" then
SQL = "SELECT * from software order by titel asc"
end if

if sortera = "forfattare" then
SQL = "SELECT * from software order by av asc"
end if

if sortera = "datum" then
SQL = "SELECT * from software order by datum asc"
end if
end if

if subject = other then
if sortera = "" then
SQL = "SELECT * from other order by ID desc"
end if

if sortera = "titel" then
SQL = "SELECT * from other order by titel asc"
end if

if sortera = "forfattare" then
SQL = "SELECT * from other order by av asc"
end if

if sortera = "datum" then
SQL = "SELECT * from other order by datum asc"
end if
end if

rs.Open SQL, mincon

color = 0
%>

men vad är felet?
rad 81 är alltså

rs.Open SQL, mincon
LarsGMedlem sedan dec. 200012 464 inlägg
#2
if subject = "hardware" then

och likadant på de andra rader där du jämför subject. Det som händer är att variabeln SQL aldrig tilldelas något värde.

131 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
129 ms — hämta tråd, inlägg och bilagor (db)