Forums

This topic is locked

MS SQL search with DW 8.02 & ASP

Posted 27 Dec 2007 20:30:16
1
has voted
27 Dec 2007 20:30:16 Jens Jakobsen posted:
I'm no longer able to create search pages since I started switched from Access to MS SQL.

Please try a search key word at dragoer-kajakklub.dk/default.asp (try using the word 'bliver' without the annotations).

The error I get is a:
ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/soeg.asp, line 164


**************************************************************************************************
The search form is like this:
<div class="searchField">
<form action="soeg.asp" name="Search" method="POST">
<input name="Search" type="text" size="50" />
<input type="submit" name="Submit" value="Søg" />
</form>
</div><!--EOF SEARCHFIELD-->
**************************************************************************************************



The result recordset is like this:

<%
Dim rsSoeg__soeg
rsSoeg__soeg = "abcdefg"
If (Request.Form("Search" <> "" Then
rsSoeg__soeg = Request.Form("Search"
End If
%>
<%
Dim rsSoeg
Dim rsSoeg_cmd
Dim rsSoeg_numRows

Set rsSoeg_cmd = Server.CreateObject ("ADODB.Command"
rsSoeg_cmd.ActiveConnection = MM_connSQL_STRING
rsSoeg_cmd.CommandText = "SELECT pkIntNewsID, fkIntCatID, fkIntSubCatID, strNewsHeader, strNewsMemo, dmyCreatedDate, dmyStartDate, dmyEndDate, intSticky, fkStrMailCreatedBy, dmyEventDate, strUpload, intLinkPlace FROM dragoer_kajakklub_dk.[62tblNewsMemo] WHERE strNewsMemo LIKE ?"
rsSoeg_cmd.Prepared = true
rsSoeg_cmd.Parameters.Append rsSoeg_cmd.CreateParameter("param1", 200, 1, 255, rsSoeg__soeg) ' adVarChar

Set rsSoeg = rsSoeg_cmd.Execute
rsSoeg_numRows = 0
%>
**************************************************************************************************

My placeholder is like this syntax: WHERE strNewsMemo LIKE ?

What the feek is wrong?

Reply to this topic