CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    1
  • Date Created
    Sunday, September 26, 2010
  • Last Updated
    Thursday, July 26, 2012
  • This Article Has been Viewed
    5446 times
  • Short Desc
    This error can be caused if you have misspelled your Table.FieldName, and can also be caused when using Parameterized Queries against an Access Database.
  • Details
    This issue will happen if you misspell the name of your Column Name.
    The error will be.
    In Access Database, this will happen at times when you are using Parameterized Queries. This however, does not happen when you are using SQL Server.
    To completely resolve this issue, it is strongly recommended, that you switch from Access to SQL Server.

     
    Microsoft JET Database Engine (0x80040E10)
    No value given for one or more required parameters.
    /InsertUpdate.asp, line 98


    Examples of this issue are


    <%
    SQLUpdateEdit2 = SQLUpdateEdit2 & " MainFont ='" & strMainFont & "', "
    %>

    (or)
    <%
    sql.commandtext="update table set MainFont=?"
    sql.Parameters.Append sql.CreateParameter("@MFont", 3, 1, , strMainFont)
    %>


    MainFont <-- This is the name of the Input Field of your page.

    MFont <-- Is the name of your Table.FieldName.
  • Recreate Issue
    Recreate this issue:
    Scenario #1:
    <%
    SQLUpdateEdit2 = SQLUpdateEdit2 & " MainFont ='" & strMainFont & "', "
    %>

    (or)
    <%
    sql.commandtext="update table set MainFont=?"
    sql.Parameters.Append sql.CreateParameter("@MFont", 3, 1, , strMainFont)
    %>


    Scenario #2:
    If you are dealing with An Access Database, sometimes it does not like it when you use Parameterized Queries like the below.

    <%
    chAffItem.commandtext="SELECT MAID, BandName, AlbumURL, AlbumName, AlbumPrice, AlbumImage, AffStore, MediaType FROM MediaAffiliate WHERE BandName=? and AlbumName=?"
    chAffItem.Parameters.Append chAffItem.CreateParameter("@BandName", adVarChar, adParamInput, 100, BandName)
    chAffItem.Parameters.Append chAffItem.CreateParameter("@AlbumName", adVarChar, adParamInput, 1000, AlbumName)
    %>

  • Resolve Issue
    To resolve this issue
    Scenario #1:
    <%
    SQLUpdateEdit2 = SQLUpdateEdit2 & " MFont ='" & strMainFont & "', "
    (or)
    sql.commandtext="update table set MFont=?"
    sql.Parameters.Append sql.CreateParameter("@MFont", 3, 1, , strMainFont)
    %>


    Scenario #1:
    When dealing with Parameterized Queries, you may have to look at other means, in order to continue testing your code. One way is to go back to the old classic coding.

    <%
    chAffItem.commandtext="SELECT MAID, BandName, AlbumURL, AlbumName, AlbumPrice, AlbumImage, AffStore, MediaType FROM MediaAffiliate WHERE BandName='"&BandName&"' and AlbumName='"&AlbumName&"'"
    %>


    Now, the above will work, however, I strongly suggest that you find another type of work around for this issue. This article will be updated again, once the issue is resolved, or more information becomes available.