I need help!

Results 1 to 2 of 2

Thread: I need help!

  1. #1
    Join Date
    Dec 1969

    Default I need help!

    I get this error:<BR>====<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR>/home.asp, line 97 <BR>====<BR>with this code:<BR>====<BR>.<BR>.<BR>.<BR> &#060;%<BR> Dim strVoted, sqlstmt<BR> strVoted = Request.Cookies("Voted")<BR> Const iWidth = 148<BR> &#039We need to create a dynamic array just big enough to hold<BR> &#039 all of our voting options<BR><BR> if strVoted = "Yes" then<BR> sqlstmt = "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> response.write sqlstmt <BR> <BR> &#060;line 97&#062; rsy.Open sqlstmt, adOpenStatic, adLockReadOnly <BR><BR> Dim PollOptions()<BR> Redim PollOptions(rsy.RecordCount,2)<BR>.<BR>.<BR>.

  2. #2
    Join Date
    Dec 1969

    Default RE: I need help!

    AHH! You changed the code!! :)<BR><BR>You need this code before the code you&#039ve got shown:<BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _<BR> Server.MapPath("Poll.mdb") & ";"<BR>objConn.Open<BR><BR><BR><BR>This creates a connection object. Then, on line 97, you need to open your recordset object like so:<BR><BR>objRS.Open strSQL, objConn<BR><BR>You can include the cursor and locktype, but they need to go after objConn, like so:<BR><BR>objRS.Open strSQL, objConn, adOpenStatic, adLockReadonly.<BR><BR>Refer to:<BR>http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/sdkdoc/sna/thorref4_7ko2.htm<BR><BR>for documentation on the recordset object&#039s open method.

Posting Permissions

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