Help! Too few Parameters?

Results 1 to 2 of 2

Thread: Help! Too few Parameters?

  1. #1
    Warren G Guest

    Default Help! Too few Parameters?

    Hi,<BR><BR> I&#039ve got the following error... any idea how to fix?<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e10&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR><BR>/waz/utilities.asp, line 32 <BR><BR>My code snipits are: (line 32 is highlighted)<BR><BR>sub writeToDB(sqlString)<BR> Dim objRS<BR> Set objRS = Server.CreateObject("ADODB.Recordset") <BR> Set objRS = objConn.Execute(sqlString) &#039***** LINE 32!!!!****<BR> objRS.Close<BR> Set objRS = Nothing<BR>end sub<BR><BR>&#039*******************************<BR ><BR>&#060;body&#062;<BR>&#060;%<BR> connectToDb()<BR><BR> Dim requestedNum <BR> Dim email<BR><BR> requestedNum = request.Form("numberRequest")<BR> email = request.Form("SubEmail")<BR><BR> strSQL ="INSERT INTO SubscriberInfo (ContactID, emailAddress) VALUES ("&requestedNum&","&chr(34)& email & chr(34)&")"<BR><BR> Response.Write strSQL<BR> Response.Write "<BR>"<BR><BR> writeToDB(strSQL)<BR><BR> disconnectFromDb()<BR>%&#062;<BR><BR><BR><BR><BR>< BR><BR>

  2. #2
    Scott S Guest

    Default RE: Help! Too few Parameters?

    I&#039m not sure if this is it but, one thing i noticed was this:<BR><BR>Set objRS = objConn.Execute(sqlString) &#039***** LINE 32!!!!****<BR><BR>If you are inserting a record to the database you wouldnt get a recordset back. Not even an empty one. try it like this:<BR><BR>objConn.Execute (sqlString)<BR><BR>thats how I usually handle insertions. <BR><BR> also, in your code there is no connection to the database, i will assume that objconn is established by ConnecttoDb(). Try writing it all out without using functions, that sometimes helps me. First i get it working, then i break it up & make it look neat. <BR><BR>Hope this helps<BR><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