Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default I'm baffled...

    Help...

    This is my error
    (I've searched all over help regarding the famous 80040e10 error)


    Microsoft JET Database Engine error '80040e10'
    No value given for one or more required parameters.
    orderSearchDetails.asp, line 36



    Here's my code...


    Dim searchChoice
    searchChoice = Request.form("searchChoice")

    Select Case searchChoice
    Case "orderID"
    searchVarible = Request.form("searchBox")
    valueID = "orderID"

    Case "email"
    searchVarible = Request.form("searchBox")
    valueID = "'email'"

    Case "lName"
    searchVarible = Request.form("searchBox")
    valueID = "'lName'"

    end select

    'Connect to the included MS Access database
    Set MyConn = Server.CreateObject("ADODB.Connection")
    MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
    Server.MapPath("../database/metacart.mdb") & ";"
    Set MyRS = Server.CreateObject("ADODB.Recordset")

    mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    DESC;"
    'Opened as Read-Only
    MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE

    'UNCOMMENT TO VIEW SQL STATEMENT--------------------------------
    'Response.Write(mySQL)
    'Response.End


    I've using the select/case because two of my search fields are text
    and one is numeric.

    Thanks in advance
    % =joe % Guest

  2. Similar Questions and Discussions

    1. Baffled by CFLOCK
      I have a question about using CFLOCK. I am a self-taught programmer running CF 4.5 (and, I should say, helped a lot by the kind people on this...
    2. baffled by Access 2002 - Any ideas
      I have this simple shopping cart that I am working with with two databases - products & orders -orders has two tables: orders & itemsOrdered...
    3. Can't extract text from PDF, baffled...
      Hi all, I'm not able to extract the text from a PDF. I copy and then when I paste, all I get is SPACES, bizarre. I even tried the batch process...
    4. Baffled? This IZ a REAL PUZZLER!!
      I imported a Photoshop 7 file into Corel Draw 9 and typed some text on top . At first the PSD file was 46% transparent. The font in Corel is Black...
  3. #2

    Default Re: I'm baffled...

    % =joe % wrote:
    > Help...
    >
    > This is my error
    > (I've searched all over help regarding the famous 80040e10 error)
    >
    >
    > Microsoft JET Database Engine error '80040e10'
    > No value given for one or more required parameters.
    > orderSearchDetails.asp, line 36
    >
    >
    >
    > Here's my code...
    >
    >
    > Dim searchChoice
    > searchChoice = Request.form("searchChoice")
    >
    > Select Case searchChoice
    > Case "orderID"
    > searchVarible = Request.form("searchBox")
    > valueID = "orderID"
    >
    > Case "email"
    > searchVarible = Request.form("searchBox")
    > valueID = "'email'"
    >
    > Case "lName"
    > searchVarible = Request.form("searchBox")
    > valueID = "'lName'"
    >
    > end select
    >
    > 'Connect to the included MS Access database
    > Set MyConn = Server.CreateObject("ADODB.Connection")
    > MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
    > Server.MapPath("../database/metacart.mdb") & ";"
    > Set MyRS = Server.CreateObject("ADODB.Recordset")
    >
    > mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    > orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    > DESC;"
    > 'Opened as Read-Only
    > MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE
    >
    > 'UNCOMMENT TO VIEW SQL STATEMENT--------------------------------
    > 'Response.Write(mySQL)
    > 'Response.End
    >
    Why haven't you shown us the SQL statement? That is the key to debugging
    this error, which usually means that you have referred to a field which does
    not exist, usually due to misspelling, or due to using a reserved keyword
    for your field name (which does not appear to be the case here).

    You can avoid the error entirely in the future by using saved parameter
    queries instead of dynamic sql. See some of the other posts I've made today
    for examples

    HTH,
    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  4. #3

    Default Re: I'm baffled...

    > MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE
    >
    > 'UNCOMMENT TO VIEW SQL STATEMENT--------------------------------
    > 'Response.Write(mySQL)
    So, UNCOMMENT, run again, and show us the result.


    Aaron Bertrand - MVP Guest

  5. #4

    Default Re: I'm baffled...

    Sorry for the mix up. I did run it (uncommented) and the result was:
    > Microsoft JET Database Engine error '80040e10'
    > No value given for one or more required parameters.
    > orderSearchDetails.asp, line 36


    MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36

    Here is my sql statement:
    mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    > orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    > DESC;"

    I did check and re-check the spelling of my field names, and I am not
    using any reserved words. That's why I'm turing to the justice league
    for help.

    I am still unsure about using cursor types and lock types. Could that
    be something?

    Thanks again
    % =joe % Guest

  6. #5

    Default Re: I'm baffled...

    I think they were after the result of

    RESPONSE.WRITE MYSQL

    that you copy and paste from your browser, not the code.

    Ray at work

    "% =joe %" <jweiss@lanelabs.com> wrote in message
    news:1324914.0402061648.6ddd79e1@posting.google.co m...
    > Sorry for the mix up. I did run it (uncommented) and the result was:
    >
    > > Microsoft JET Database Engine error '80040e10'
    > > No value given for one or more required parameters.
    > > orderSearchDetails.asp, line 36
    >
    >
    >
    > MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36
    >
    > Here is my sql statement:
    > mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    > > orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    > > DESC;"
    >
    >
    > I did check and re-check the spelling of my field names, and I am not
    > using any reserved words. That's why I'm turing to the justice league
    > for help.
    >
    > I am still unsure about using cursor types and lock types. Could that
    > be something?
    >
    > Thanks again

    Ray at Guest

  7. #6

    Default Re: I'm baffled...

    "% =joe %" <jweiss@lanelabs.com> wrote in message
    news:1324914.0402061648.6ddd79e1@posting.google.co m...
    > Sorry for the mix up. I did run it (uncommented) and the result was:
    >
    > > Microsoft JET Database Engine error '80040e10'
    > > No value given for one or more required parameters.
    > > orderSearchDetails.asp, line 36
    >
    >
    >
    > MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36
    >
    > Here is my sql statement:
    > mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    > > orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    > > DESC;"
    >
    >
    > I did check and re-check the spelling of my field names, and I am not
    > using any reserved words. That's why I'm turing to the justice league
    > for help.
    >
    > I am still unsure about using cursor types and lock types. Could that
    > be something?
    >
    > Thanks again
    You have to comment out line 36 or it's never going to get to lines 39
    and 40.


    Chris Hohmann Guest

  8. #7

    Default Re: I'm baffled...

    I did coment it out, just wasn't clear about it, sorry.

    Here's my origional code...

    Dim searchChoice
    searchChoice = Request.form("searchChoice")

    Select Case searchChoice
    Case "orderID"
    searchVarible = Request.form("searchBox")
    valueID = "orderID"

    Case "email"
    searchVarible = Request.form("searchBox")
    valueID = "'email'"

    Case "lName"
    searchVarible = Request.form("searchBox")
    valueID = "'lName'"

    end select

    'Connect to the included MS Access database
    Set MyConn = Server.CreateObject("ADODB.Connection")
    MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
    Server.MapPath("../database/metacart.mdb") & ";"
    Set MyRS = Server.CreateObject("ADODB.Recordset")

    mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    DESC;"
    'Opened as Read-Only
    MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE

    Response.Write(mySQL)
    Response.End


    Here is the error I got...
    > Microsoft JET Database Engine error '80040e10'
    > No value given for one or more required parameters.
    > orderSearchDetails.asp, line 36

    I have read much of 80040e10 errors and making sure that there aren't
    any mispesslings in my field names (and they're not)

    Could this be a lock type issue (that is where I am a bit fuzzy).

    Thanks again
    % =joe % Guest

  9. #8

    Default Re: I'm baffled...

    % =joe % wrote:
    Sheesh! Change your code to this:
    ----------------------------------------------------------------------------
    ---
    mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    DESC;"

    Response.Write(mySQL)
    Response.End


    'Connect to the included MS Access database
    Set MyConn = Server.CreateObject("ADODB.Connection")
    MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
    Server.MapPath("../database/metacart.mdb") & ";"
    Set MyRS = Server.CreateObject("ADODB.Recordset")
    'Opened as Read-Only
    MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE
    ------------------------------------------------------------------

    You need to see the result of Response.Write(mySQL). If that does not tell
    you what the problem is (you should copy and paste the result from the
    browser window into the SQL View of the Access query builder to try and
    debug it), then you need to show us the structure of the orders table along
    with the result of the response.write.

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  10. #9

    Default Re: I'm baffled...

    "% =joe %" <jweiss@lanelabs.com> wrote in message
    news:1324914.0402080946.33758a35@posting.google.co m...
    > I did coment it out, just wasn't clear about it, sorry.
    >
    > Here's my origional code...
    >
    > Dim searchChoice
    > searchChoice = Request.form("searchChoice")
    >
    > Select Case searchChoice
    > Case "orderID"
    > searchVarible = Request.form("searchBox")
    > valueID = "orderID"
    >
    > Case "email"
    > searchVarible = Request.form("searchBox")
    > valueID = "'email'"
    >
    > Case "lName"
    > searchVarible = Request.form("searchBox")
    > valueID = "'lName'"
    >
    > end select
    >
    > 'Connect to the included MS Access database
    > Set MyConn = Server.CreateObject("ADODB.Connection")
    > MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
    > Server.MapPath("../database/metacart.mdb") & ";"
    > Set MyRS = Server.CreateObject("ADODB.Recordset")
    >
    > mySQL = "SELECT orderID,orderDate,fName,lName,email,orderStatus FROM
    > orders WHERE "&searchVarible&" LIKE "&valueID&" ORDER BY orderDate
    > DESC;"
    > 'Opened as Read-Only
    > MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE
    >
    > Response.Write(mySQL)
    > Response.End
    >
    >
    > Here is the error I got...
    >
    > > Microsoft JET Database Engine error '80040e10'
    > > No value given for one or more required parameters.
    > > orderSearchDetails.asp, line 36
    >
    >
    > I have read much of 80040e10 errors and making sure that there aren't
    > any mispesslings in my field names (and they're not)
    >
    > Could this be a lock type issue (that is where I am a bit fuzzy).
    >
    > Thanks again
    Line 36 is not commented out. Please replace this:

    MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE

    With this:

    'MyRS.Open mySQL, MyConn, 3 ' <-- LINE 36 IS HERE


    Notice, there's an apostrophe (') at the start of the line.

    -Chris Hohmann


    Chris Hohmann 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