Recordset arguments

Results 1 to 2 of 2

Thread: Recordset arguments

  1. #1
    Join Date
    Dec 1969
    Posts
    716

    Default Recordset arguments

    Could some one please tell me why I get an error that there are too few parameters for the last line of code below. This is for the poll system that was on the site a few days ago. I copied their file verbatim and this is what happens. Here is the actual error message. If anyone can help they will have my undying gratitude.<BR>-----------------------------------------------------------------<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. <BR>/test/poll3.asp, line 101 <BR>-----------------------------------------------------------------<BR><BR>strSQL = "SELECT PollOption.PollOptionID, PollOption.QuestionText, PollOption.Votes, " & _<BR> "Poll.PollQuestion " & _<BR> "FROM Poll INNER JOIN PollOption ON Poll.PollID = PollOption.PollID " & _<BR> "WHERE Poll.DateStart &#060;= #" & Date & "# AND Poll.DateEnd &#062;= #" & Date & "#;"<BR><BR> objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly<BR><BR>Justin

  2. #2
    David Milner Guest

    Default RE: Recordset arguments

    First, unless this is a mistake in your example, you have an extraneous comma at the end of your SQL string. If that is not the problem, make sure you have adOpenStatic and adLockReadOnly defined in your ASP page. While Interdev&#039s auto-complete places these in your page, the ASP parser does not know what the values are unless you specify them.<BR><BR>adOpenStatic = 3<BR>adLockReadOnly = 1<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •