Fraggel skrev:
Hmm gaaah !
Hur ser SQL satsen ut.
Response.Write SQL
Response.End
Jag vet inte... :(
Har varit inne och ändrat lite, nu säger den
Error Type:
ADODB.Recordset.1 (0x800A0BB9)
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
/databas/hast.asp, line 24
Rad 24: objRS.Open"[QUERY]", objConn, 3,3
Här är lite mer kod
<HTML>
<META NAME="Author" CONTENT="©Sophie Larsson & Karin Halvarsson 2005">
<META NAME="robots" CONTENT="noindex">
<link href="stil.css" rel="stylesheet" type="text/css">
<TITLE>Aramennoc.se - Med connemaran i focus</TITLE>
<BODY BGCOLOR="#FFFFFF">
<%
hast_id = Request.Querystring("hast_id")
Dim objConn
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objConn = Server.Createobject("ADODB.Connection")
objConn.ConnectionString="DRIVER={MySQL};SERVER=localhost;DATABASE=aramennoc_se;UID=aramennoc_se;PWD=xxxxxxxxxxx;"
objConn.Open
objRS.Open"[QUERY]", objConn, 3,3
%>
<%
SQL = "SELECT c.namn, " & _
" c.kon, " & _
" c.reg_nr, " & _
" c.stamboks_nr, " & _
" c.ras, " & _
" c.fodd, " & _
" c.dod, " & _
" c.farg, " & _
" c.tecken, " & _
" c.mankhojd, " & _
" c.uppfodare, " & _
" c.inskickad_av, " & _
" c.inskickad_av_mail, " & _
" c.ovrigt, " & _
" c.premierad, " & _
" c.utlatande, " & _
" c.verksam, " & _
" c.imp, " & _
" c.exp, " & _
" c.utlstbnr, " & _
" c.bild, " & _
" ce.namn AS e, " & _
" ce.hast_id AS e_id, " & _
" cu.namn AS u, " & _
" cu.hast_id AS u_id, " & _
" cee.namn AS ee, " & _
" cee.hast_id AS ee_id, " & _
" ceu.namn AS eu, " & _
" ceu.hast_id AS eu_id, " & _
" cue.namn AS ue, " & _
" cue.hast_id AS ue_id, " & _
" cuu.namn AS uu, " & _
" cuu.hast_id AS uu_id, " & _
" ceee.namn AS eee, " & _
" ceee.hast_id AS eee_id, " & _
" ceeu.namn AS eeu, " & _
" ceeu.hast_id AS eeu_id, " & _
" ceue.namn AS eue, " & _
" ceue.hast_id AS eue_id, " & _
" ceuu.namn AS euu, " & _
" ceuu.hast_id AS euu_id, " & _
" cuee.namn AS uee, " & _
" huee.hast_id AS uee_id, " & _
" cueu.namn AS ueu, " & _
" cueu.hast_id AS ueu_id, " & _
" cuue.namn AS uue, " & _
" cuue.hast_id AS uue_id, " & _
" cuuu.namn AS uuu, " & _
" cuuu.hast_id AS uuu_id, " & _
" ceeee.namn AS eeee, " & _
" ceeee.hast_id AS eeee_id, " & _
" ceeeu.namn AS eeeu, " & _
" ceeeu.hast_id AS eeeu_id, " & _
" ceeue.namn AS eeue, " & _
" ceeue.hast_id AS eeue_id, " & _
" ceeuu.namn AS eeuu, " & _
" ceeuu.hast_id AS eeuu_id, " & _
" ceuee.namn AS euee, " & _
" ceuee.hast_id AS euee_id, " & _
" ceueu.namn AS eueu, " & _
" ceueu.hast_id AS eueu_id, " & _
" ceuue.namn AS euue, " & _
" ceuue.hast_id AS euue_id, " & _
" ceuuu.namn AS euuu, " & _
" ceuuu.hast_id AS euuu_id, " & _
" cueee.namn AS ueee, " & _
" cueee.hast_id AS ueee_id, " & _
" cueeu.namn AS ueeu, " & _
" cueeu.hast_id AS ueeu_id, " & _
" cueue.namn AS ueue, " & _
" cueue.hast_id AS ueue_id, " & _
" cueuu.namn AS ueuu, " & _
" cueuu.hast_id AS ueuu_id, " & _
" cuuee.namn AS uuee, " & _
" cuuee.hast_id AS uuee_id, " & _
" cuueu.namn AS uueu, " & _
" cuueu.hast_id AS uueu_id, " & _
" cuuue.namn AS uuue, " & _
" cuuue.hast_id AS uuue_id, " & _
" cuuuu.namn AS uuuu, " & _
" cuuuu.hast_id AS uuuu_id " & _
"FROM connemara c, " & _
" connemara ce, " & _
" connemara cu, " & _
" connemara cee, " & _
" connemara ceu, " & _
" connemara cue, " & _
" connemara cuu, " & _
" connemara ceee, " & _
" connemara ceeu, " & _
" connemara ceue, " & _
" connemara ceuu, " & _
" connemara cuee, " & _
" connemara cueu, " & _
" connemara cuue, " & _
" connemara cuuu, " & _
" connemara ceeee, " & _
" connemara ceeeu, " & _
" connemara ceeue, " & _
" connemara ceeuu, " & _
" connemara ceuee, " & _
" connemara ceueu, " & _
" connemara ceuue, " & _
" connemara ceuuu, " & _
" connemara cueee, " & _
" connemara cueeu, " & _
" connemara cueue, " & _
" connemara cueuu, " & _
" connemara cuuee, " & _
" connemara cuueu, " & _
" connemara cuuue, " & _
" connemara cuuuu " & _
"WHERE h.hast_id = "& hast_id &" " & _
"AND c.pappa = ce.hast_id " & _
"AND c.mamma = cu.hast_id " & _
"AND ce.pappa = cee.hast_id " & _
"AND ce.mamma = ceu.hast_id " & _
"AND cu.pappa = cue.hast_id " & _
"AND cu.mamma = cuu.hast_id " & _
"AND cee.pappa = ceee.hast_id " & _
"AND cee.mamma = ceeu.hast_id " & _
"AND ceu.pappa = ceue.hast_id " & _
"AND ceu.mamma = ceuu.hast_id " & _
"AND cue.pappa = cuee.hast_id " & _
"AND cue.mamma = cueu.hast_id " & _
"AND cuu.pappa = cuue.hast_id " & _
"AND cuu.mamma = cuuu.hast_id " & _
"AND ceee.pappa = ceeee.hast_id " & _
"AND ceee.mamma = ceeeu.hast_id " & _
"AND ceeu.pappa = ceeue.hast_id " & _
"AND ceeu.mamma = ceeuu.hast_id " & _
"AND ceue.pappa = ceuee.hast_id " & _
"AND ceue.mamma = ceueu.hast_id " & _
"AND ceuu.pappa = ceuue.hast_id " & _
"AND ceuu.mamma = ceuuu.hast_id " & _
"AND cuee.pappa = cueee.hast_id " & _
"AND cuee.mamma = cueeu.hast_id " & _
"AND cueu.pappa = cueue.hast_id " & _
"AND cueu.mamma = cueuu.hast_id " & _
"AND cuue.pappa = cuuee.hast_id " & _
"AND cuue.mamma = cuueu.hast_id " & _
"AND cuuu.pappa = cuuue.hast_id " & _
"AND cuuu.mamma = cuuuu.hast_id "
objRS.Open SQL, MinCon
Session("connemara_namn")=rs("namn")
utl = rs("utlatande")
ovr = rs("ovrigt")
%>
<SPAN CLASS="stor"><%=(rs("namn"))%></SPAN>
<SPAN CLASS="normal">
<%
IF (rs("reg_nr"))<>"" THEN %>
<BR>(<%=rs("reg_nr")%>)
<%
END IF %>
<%
IF (rs("fodd"))<>"" OR (rs("uppfodare"))<>"" THEN %>
<BR>Född <%
IF (rs("fodd"))<>"" THEN %><%=rs("fodd")%> <% END IF %><% IF (rs("uppfodare"))<>"" THEN %><%=rs("uppfodare")%><% END IF %><% END IF %>
<BR><%=rs("kon")%>
<% IF (rs("farg"))<>"" THEN %>, <%=rs("farg")%><% END IF %>
<% IF (rs("tecken"))<>"" THEN %>, <%=rs("tecken")%><% END IF %>
<% IF (rs("mankhojd"))<>"0" AND (rs("mankhojd"))<>"" THEN %>, <%=rs("mankhojd")%> cm<% END IF %>
<BR>
<%
IF (rs("premierad"))<>"" THEN %>
<%=rs("premierad")%>.
<%
END IF %>
<%
IF (rs("verksam"))<>"" THEN %>
Pr. <%=(rs("verksam"))%>.
<%
END IF %>
<%
IF (rs("imp"))<>"" OR (rs("exp"))<>"" THEN %>
<BR>
<%
IF (rs("imp"))<>"" THEN %>
Importerad: <%=(rs("imp"))%>
<%
END IF %>
<%
IF (rs("exp"))<>"" THEN %>
Exporterad: <%=(rs("exp"))%>
<%
END IF %>
<%
END IF %>
<%
IF (rs("bild"))<>"" THEN %>
<BR><BR>
<IMG SRC="bilder/<%=(rs("bild"))%>"><BR>
<%
END IF %>
<BR>
</SPAN>
<%
IF utl<>"" THEN %>
<BR>
<TABLE WIDTH="500" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#111111" class="normal" STYLE="border-collapse: collapse">
<TR>
<TD>
Utlåtande: <%=utl%>