R
Robert Mark Bram
Hi All!
My ASP page below receives the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/polyprint/test.asp, line 31
Line 31 is this line from below:
newsletterText.open (sql);
The sql statement works ok in Access and I have used the ConnectionString on
other pages, so it works too. I have also used Open() in this way on other
pages..
I am a loss to know what other parameters are expected!
Any advice would be welcome!
Rob

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/adojavas.inc"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
/*
This works ok!
SELECT * FROM newsletterText
WHERE pageName="1"
and language="English"
order by paragraph
*/
var sql ="SELECT * FROM newsletterText " +
"WHERE pageName=\"1\"" +
" and language=\"English\" " +
"order by paragraph";
Response.Write( sql + "<br>");
var polyprintConnection = Server.CreateObject ("ADODB.Connection");
polyprintConnection.ConnectionString="DSN=PolyprintNewsletter";
polyprintConnection.Open();
var newsletterText = Server.CreateObject ("ADODB.Recordset");
newsletterText.ActiveConnection = polyprintConnection;
newsletterText.CursorType = adOpenForwardOnly;
newsletterText.CursorLocation = adUseClient;
newsletterText.LockType = adLockReadOnly;
newsletterText.open (sql);
%>
</body>
</html>
My ASP page below receives the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
/polyprint/test.asp, line 31
Line 31 is this line from below:
newsletterText.open (sql);
The sql statement works ok in Access and I have used the ConnectionString on
other pages, so it works too. I have also used Open() in this way on other
pages..
I am a loss to know what other parameters are expected!
Any advice would be welcome!
Rob
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include virtual="/adojavas.inc"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
/*
This works ok!
SELECT * FROM newsletterText
WHERE pageName="1"
and language="English"
order by paragraph
*/
var sql ="SELECT * FROM newsletterText " +
"WHERE pageName=\"1\"" +
" and language=\"English\" " +
"order by paragraph";
Response.Write( sql + "<br>");
var polyprintConnection = Server.CreateObject ("ADODB.Connection");
polyprintConnection.ConnectionString="DSN=PolyprintNewsletter";
polyprintConnection.Open();
var newsletterText = Server.CreateObject ("ADODB.Recordset");
newsletterText.ActiveConnection = polyprintConnection;
newsletterText.CursorType = adOpenForwardOnly;
newsletterText.CursorLocation = adUseClient;
newsletterText.LockType = adLockReadOnly;
newsletterText.open (sql);
%>
</body>
</html>