Too few parameters. Expected error

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: Too few parameters. Expected error

    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message news:<OEuOwifODHA.2224@TK2MSFTNGP10.phx.gbl>...
    > Response.Write(recordset.Source)
    > Response.End
    >
    > put that *before* the line that's generating the error. Response.End will
    > stop execution of further code (so the error is not generated)
    >
    > Cheers
    > Ken
    >
    >
    > "THE BIG MAN" <alanmurray28@yahoo.co.uk> wrote in message
    > news:e0febae8.0306231239.76ca1870@posting.google.c om...
    > : How do I do a write response when I am getting an error message?
    Sorry still having problems with this, I am just a beginner in asp. I
    am not getting an line number with my error message.
    I have tried putting
    Response.Write(recordset.Source)
    > Response.End
    In the code but that just gives an error message.
    THE BIG MAN Guest

  2. Similar Questions and Discussions

    1. too few parameters expected 1
      Hello, I am getting the error message Error: java.sql.SQLException: Too few parameters. Expected 1. All column names in SQL command are matching...
    2. Too few parameters. Expected 1.
      I've searched all over the place, and can't find a solution to this error message to my query. I've come across it before, and I know that a common...
    3. Too few parameters. Expected 2.
      My form page: <cfform action="InstreamUpdate2.cfm" method="post"> <CFQUERY NAME="EditQueryInstreamWork" DATASOURCE="Instreamworks"> select *...
    4. Error object expected
      hey folks! I'm getting the usual NOOB error object expected. I'm creating a simple box and applying a texture to it: The specific line i get the...
    5. IIS ASP Object Expected Error
      John wrote: Should be "Err.Clear". The Number propery is read-only IIRC.
  3. #2

    Default Re: Too few parameters. Expected error

    "Mark Schupp" <mschupp@ielearning.com> wrote in message news:<egr8ZlxPDHA.4024@tk2msftngp13.phx.gbl>...
    > What is the error message?
    > Show all of your code (if it is too cumbersome, remove extraneous code until
    > you have a small script the demonstrates the problem).
    >
    > --
    > Mark Schupp
    > --
    > Head of Development
    > Integrity eLearning
    > Online Learning Solutions Provider
    > [email]mschupp@ielearning.com[/email]
    > [url]http://www.ielearning.com[/url]
    > 714.637.9480 x17
    >
    >
    > "THE BIG MAN" <alanmurray28@yahoo.co.uk> wrote in message
    > news:e0febae8.0306290322.534db082@posting.google.c om...
    > > "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    > news:<OEuOwifODHA.2224@TK2MSFTNGP10.phx.gbl>...
    > > > Response.Write(recordset.Source)
    > > > Response.End
    > > >
    > > > put that *before* the line that's generating the error. Response.End
    > will
    > > > stop execution of further code (so the error is not generated)
    > > >
    > > > Cheers
    > > > Ken
    > > >
    > > >
    > > > "THE BIG MAN" <alanmurray28@yahoo.co.uk> wrote in message
    > > > news:e0febae8.0306231239.76ca1870@posting.google.c om...
    > > > : How do I do a write response when I am getting an error message?
    > >
    > > Sorry still having problems with this, I am just a beginner in asp. I
    > > am not getting an line number with my error message.
    > > I have tried putting
    > > Response.Write(recordset.Source)
    > > > Response.End
    > >
    > > In the code but that just gives an error message.
    I posted the code on my first post.
    The error message is Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    /intranet/SPEED/TMPm95hehgtkh.asp, line 20
    > Response.End
    THE BIG MAN Guest

  4. #3

    Default Re: Too few parameters. Expected error

    I still can not response write the sql statment my code is
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="../Connections/speedcon1.asp" -->
    <%
    Dim speed__v_name
    speed__v_name = "%"
    if (Request.QueryString("v_name") <> "") then speed__v_name =
    Request.QueryString("v_name")
    %>
    <%
    set speed = Server.CreateObject("ADODB.Recordset")
    speed.ActiveConnection = MM_speedcon1_STRING
    speed.Source = "SELECT * FROM speed WHERE FNname LIKE '%" +
    Replace(speed__v_name, "'", "''") + "%'"
    speed.CursorType = 0
    speed.CursorLocation = 2
    speed.LockType = 3
    speed.Open()
    speed_numRows = 0

    %>
    <%

    Dim speed__MMColParam
    speed__MMColParam = "1"
    If (Request.Form("FName") <> "") Then
    speed__MMColParam = Request.Form("FName")
    End If
    %>
    <%
    Dim speed
    Dim speed_numRows

    Set speed = Server.CreateObject("ADODB.Recordset")
    speed.ActiveConnection = MM_speed2_STRING
    speed.Source = "SELECT * FROM speed WHERE FName = '" +
    Replace(speed__MMColParam, "'", "''") + "' ORDER BY FName ASC"
    speed.CursorType = 0
    speed.CursorLocation = 2
    speed.LockType = 1
    speed.Open()
    Response.Write(speed.source)
    > Response.End
    speed_numRows = 0
    %>

    What I am doing wrong in the write resopnse part to bring up the
    error.Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    THE BIG MAN Guest

  5. #4

    Default Re: Too few parameters. Expected error

    "THE BIG MAN" <alanmurray28@yahoo.co.uk> wrote in message
    news:e0febae8.0307060804.19bfcd5@posting.google.co m...
    > I still can not response write the sql statment my code is
    > <%@LANGUAGE="VBSCRIPT"%>
    > <!--#include file="../Connections/speedcon1.asp" -->
    > <%
    > Dim speed__v_name
    > speed__v_name = "%"
    > if (Request.QueryString("v_name") <> "") then speed__v_name =
    > Request.QueryString("v_name")
    > %>
    > <%
    > set speed = Server.CreateObject("ADODB.Recordset")
    > speed.ActiveConnection = MM_speedcon1_STRING
    > speed.Source = "SELECT * FROM speed WHERE FNname LIKE '%" +
    > Replace(speed__v_name, "'", "''") + "%'"
    > speed.CursorType = 0
    > speed.CursorLocation = 2
    > speed.LockType = 3
    > speed.Open()
    > speed_numRows = 0
    >
    > %>
    > <%
    >
    > Dim speed__MMColParam
    > speed__MMColParam = "1"
    > If (Request.Form("FName") <> "") Then
    > speed__MMColParam = Request.Form("FName")
    > End If
    > %>
    > <%
    > Dim speed
    > Dim speed_numRows
    >
    > Set speed = Server.CreateObject("ADODB.Recordset")
    > speed.ActiveConnection = MM_speed2_STRING
    > speed.Source = "SELECT * FROM speed WHERE FName = '" +
    > Replace(speed__MMColParam, "'", "''") + "' ORDER BY FName ASC"
    > speed.CursorType = 0
    > speed.CursorLocation = 2
    > speed.LockType = 1
    > speed.Open()
    > Response.Write(speed.source)
    > > Response.End
    >
    > speed_numRows = 0
    > %>
    >
    > What I am doing wrong in the write resopnse part to bring up the
    > error.Error Type:
    > Microsoft VBScript compilation (0x800A0400)
    > Expected statement
    > speed.Source = "SELECT * FROM speed WHERE FName = '" +

    Surely this should be & not + to concatenate two strings? Also, if it
    really is split over two lines then you should have a line continuation
    character ( _ ) i.e.:

    speed.Source = "SELECT * FROM speed WHERE FName = '" & _
    Replace(speed__MMColParam, "'", "''") + "' ORDER BY FName ASC"

    --
    John Blessing
    [url]http://www.LbeHelpdesk.com[/url] - Help Desk software at affordable prices
    [url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
    [url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
    [url]http://www.lbesync.com[/url] - Synchronize two Outlook Personal Folders

    John Blessing Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139