SQL Statement Problem

by "Keith Parker" <diades(at)diades.screaming.net>

 Date:  Mon, 6 Mar 2000 01:30:22 -0000
 To:  <hwg-servers(at)hwg.org>
  todo: View Thread, Original
Hi,

I have a problem with accessing a database for specific files in a table
using an SQL statement.  The script "snippet" is below:

*****************************
<% Language = VBScript %>
<!--#include file="cdovbs.inc" -->
<!-- #Include file="adovbs.inc" -->
<%
 Param = Request.QueryString("Param")
 Data = Request.QueryString("Data")
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "msgs","",""
    Set rst = Server.CreateObject("ADODB.Recordset")
 rst.ActiveConnection = conn
 rst.CursorType = adOpenKeyset
 rst.LockType = adLockOptimistic
 rst.Source = "SELECT tblmessage.MsgNdx, tblmessage.ddName,
tblmessage.ddEmail, tblmessage.ddTitle, tblmessage.ddPosition,
tblmessage.ddCompany, tblmessage.ddTelephone1, tblmessage.ddTelephone2,
tblmessage.ddTelephone3, tblmessage.ddExt, tblmessage.ddFax,
tblmessage.ddStreet, tblmessage.ddArea, tblmessage.ddCity,
tblmessage.ddPostCode, tblmessage.ddCountry, tblmessage.ddAdvise,
tblmessage.ddSubject, tblmessage.ddMessage, tblmessage.ddMessageDate,
tblmessage.ddReply, tblmessage.ddDateReplied, tblmessage.ddFormat FROM
tblmessage WHERE (((tblmessage.ddReply) Like " & "'" & "None" & "'" & "))"
 rst.Open
 Dim rc
 rc = rst.RecordCount
**********************

Whe I run this, I get the following error:

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

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

/cgi-bin/temp.asp, line 15
**********************

Can anybody help me out please? I am going slowly nuts!!

NB: Line 15 is "rst.Open"

Cheers,

Keith

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA