please help ASP error

Discussion in 'C#' started by gibboap, Nov 15, 2006.

  1. #1
    i am writing a blog section to a school site

    the id is the username, this is correctly being passed over in the URL this is the code

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="files/include.inc"-->
    <% id = trim(request("id"))

    strSQL = "SELECT * FROM profiles WHERE profiles.username = " & id

    set RSprofiles = server.CreateObject("ADODB.Recordset")
    Set RSprofiles = adoConnection.Execute(strSQL)%>

    <%Do While Not RSprofiles.EOF%>
    <p><%resposne.write(rsprofiles("blog"))%></p>
    <%RSprofiles.movenext
    Loop
    RSprofiles.movefirst%>

    this is the error

    Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

    /painsley.co.uk/wip/mfl/blog.asp, line 8


    any and all help as always is much appreciated!!!
     
    gibboap, Nov 15, 2006 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    do a response.write on strSQL, I have a feeling it's picking up a blank 'id' parameter
     
    frankcow, Nov 15, 2006 IP
  3. gibboap

    gibboap Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    lol have "fixed" it now grrrrr thanks any way i think i was looking 2hard (+s spelt response wrong on ther orignal

    strSQL = "SELECT * FROM profiles"

    set RSprofiles = server.CreateObject("ADODB.Recordset")
    Set RSprofiles = adoConnection.Execute(strSQL)%>
    <h1>Blog</h1>
    <%Do While Not RSprofiles.EOF%>
    <p><%if RSprofiles("username") = id then%><%response.write(RSprofiles("blog"))%></p><%end if%>
    <%RSprofiles.movenext
    Loop
    RSprofiles.movefirst%>
     
    gibboap, Nov 15, 2006 IP